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

Walter Bright newshound2 at digitalmars.com
Fri Dec 21 21:42:35 UTC 2018


On 12/21/2018 3:54 AM, Atila Neves wrote:
> On Friday, 21 December 2018 at 11:25:18 UTC, Walter Bright wrote:
>> Probably because Lisp is unusable without macros,
> 
> Lisp is perfectly usable without macros,

Technically true. Doubtful that is pragmatically true once a program exceeds a 
certain size.


>> 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.

In my subjective opinion, it is :-)


>> 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.

I've written Elisp extensions in Emacs, too. But they were all just a dozen or 
two lines. It never inspired me to write a larger program in it.

I considered adding scripting to microEmacs, but I was going to use Javascript 
for that. :-)

Lisp is an easy language to implement, document, and sandbox, making it handy 
for use as an embedded scripting language. Javascript takes months to implement 
by someone experienced writing compilers, making it not the first thing an IDE 
developer would try.

D isn't any more suitable for in-browser code than C++ is. A native language 
with raw pointers would not be a good choice for an embeddable scripting language.

Javascript has been incredibly successful as an embedded language in web pages.


More information about the Digitalmars-d mailing list