"Stop Designing Languages. Write Libraries Instead."

H. S. Teoh hsteoh at quickfur.ath.cx
Tue May 7 18:21:53 UTC 2019


On Mon, May 06, 2019 at 12:34:07PM +0000, Atila Neves via Digitalmars-d wrote:
> On Friday, 3 May 2019 at 17:34:59 UTC, JN wrote:
[...]
> > Imagine if Pegged required you to pull in "pegged-oop",
> > "pegged-traits", "pegged-exceptions"
[...]
> > and then you can't use throw because it doesn't support it, instead
> > you have to do mixin(ExceptionHandler!((e) { writeln(e.toString())
> > })) to handle exceptions. That's what could occur if a language
> > gives too much freedom and doesn't standarize on language features.
> 
> Common Lisp and Scheme have standards so I don't know what you mean.
[...]

I think what he means is if D came as a bare-bones, minimal language
without classes, exceptions, or foreach loops, but that's nevertheless
powerful enough to express all these missing language constructs. Then
since there is no standard way of implementing classes or exceptions,
but the language makes it very easy to do so because it's so powerful,
then everybody and his neighbour's dog will invent their own quirky way
of throwing exceptions, their own idiosyncratic style of implementing
classes, etc., and can do so in just a couple of hours.  It will be
great, until they need to interoperate with each other's code, at which
point they discover that their implementation of classes is
fundamentally incompatible with the other codebase's implementation, and
thus the Lisp Curse sets in and the only way to make things work is to
spend tons of time writing shim code to bridge the gap between the two.

OTOH, though, this assumes (1) there are multiple ways of implementing
feature X (classes, exceptions, what-have-you), and (2) each of these
ways are easy enough that most people would easily think of them, and it
would take very little effort to implement them.

If the core language were such that there's really only one obvious way
of implementing classes, then the fact that the language is "overly
powerful" wouldn't be a problem at all -- everyone would just invent the
same implementation of OO and it would Just Work(tm). Of course, this is
an idealistically optimistic view of how things might turn out, just as
the Lisp Curse is a pessimistic view of an "overly" powerful language.

Reality, in all likelihood, lies somewhere between these two extremes.


T

-- 
Mediocrity has been pushed to extremes.


More information about the Digitalmars-d mailing list