Why can't we derive struct's? (Hansel & Gretel)

Atila Neves atila.neves at gmail.com
Fri Dec 21 11:54:54 UTC 2018


On Friday, 21 December 2018 at 11:25:18 UTC, Walter Bright wrote:
> On 12/21/2018 2:42 AM, Atila Neves wrote:
>> I don't think any lisper has ever complained about Lisp macros 
>> - on the contrary, it's considered one of Lisp's killer 
>> features. It's a shame they're inextricably linked to the 
>> syntax (or lack thereof) and that nobody has yet figured out a 
>> good macro system that doesn't depend on S-expressions.
>
> Probably because Lisp is unusable without macros,

Lisp is perfectly usable without macros, it's just that it would 
never occur to anyone to do that. D is usable without `foreach`, 
but why would I program with that handicap? In Lisp, not using 
macros usually means typing "lambda" more than one would like. 
`foreach` isn't even the best example in D-land, `mixin` is. I 
think we can agree that `mixin` is a huge win for D. Lisp macros 
are like that, but much better.

> sort of like how C and C++ are unusable without the 
> preprocessor.

That's completely different - C/C++ have no way to reuse code 
other than the preprocessor. One technically could write a whole 
project without it, but it'd be madness. It's not at all like the 
Lisp case.

> Lisp is a great language for its ideas, and is a fine language 
> for research purposes. But somehow it just never catches on.

That depends on the definition of "catches on". Every Emacs user 
has to write Lisp (if they don't they might as well use 
notepad++); Common Lisp, Scheme and Clojure are all on Tiobe's 
top 50; Emacs Lisp and Clojure both outrank D in Github 
popularity (Common Lisp isn't that far behind).

I dare say there are orders of magnitude more programmers using 
Lisp in the browser (via Clojurescript) than there are D 
programmers doing the same.




More information about the Digitalmars-d mailing list