"Stop Designing Languages. Write Libraries Instead."

H. S. Teoh hsteoh at quickfur.ath.cx
Fri May 3 12:52:43 UTC 2019


On Fri, May 03, 2019 at 07:45:33AM +0000, JN via Digitalmars-d wrote:
> On Friday, 3 May 2019 at 02:25:47 UTC, Mike Franklin wrote:
> > This is actually what I like about D:  It is so powerful, it allows
> > users to make whatever abstraction is ideal for their use case.
> > What I'd like to see is for D to capitalize more on that.
> 
> So does Lisp. And one of the main criticism of Lisp is that every
> programmer invents their own programming language features and it's
> very hard to reuse code or libraries because everything is written in
> different style.
> 
> Remember Lisp curse
> http://www.winestockwebdesign.com/Essays/Lisp_Curse.html

This is a valid concern, and I've been thinking about it. The problem
here is standardization vs. flexibility.  The more generic a piece of
code is, i.e. the wider its scope, the more standard its API must be.
Imagine if D ranges were implemented not in Phobos but some 3rd party
library.  Inevitably people would reinvent the wheel in all shapes and
sizes, all somewhat equivalent but all slightly incompatible with each
other. Some projects use one API but others use another.  It would be
utter chaos as balkanization sets in.

But currently, we have a standard range API that, in spite of some
warts, is universal across all D code. Everyone writes their API around
it rather than reinventing their own.  The Lisp Curse doesn't set in,
and everyone reaps the benefits.

Widely-applicable things like this *need* to be standardized.

A negative example of this is the historical Tango vs. Phobos divide,
and the subsequent fallout. Some things need official endorsement, and
cannot be left for the masses to fight it out.

Eventually, what all this means is that we need a process by which
widely-applicable 3rd party libraries / frameworks get official
endorsement and standardization by the leaders of the community. This
doesn't apply to your typical library, but to high-impact, highly
generic code that has universal scope.


T

-- 
You are only young once, but you can stay immature indefinitely. -- azephrahel


More information about the Digitalmars-d mailing list