Sugar

Ingvar von Schoultz ingvar-v-s at comhem.se
Sun Aug 31 23:00:24 PDT 2008


Breton Slivka wrote:
>> One reason I brought them up now was that Java-style classes were
>> discussed. Significant parts of this class functionality could
>> instead be offered by third-party library vendors using these
>> keywords. We'd get more variation, greater freedom, and much
>> faster adaptability, than if it's defined in a standards body.
> 
> At the great expense of interoperability. In the grand scheme of
> things, I don't need greater freedom, variation, or adaptability in
> the way that I define a class. Especially if it means I have to tack
> on many kilobytes of library code to use widget X, and then many more
> Kb's to use widget Y, and cross my fingers they don't eat eachother.
> Much better to have a single built in implementation for that feature
> that everyone codes against- So I can use code without having to
> include any libraries. The end user ultimately doesn't care that you
> used a clever class library, only that the application works, is fast,
> easy to use, and bug free. Language features should be aimed squarely
> at helping programmers achieve those goals, and I don't see how
> building a new tower of babel helps.
> 
> But you know, just my opinion as a lowly developer.

You do have a point.

But the problem isn't interoperability or library size. The problem
is the copy-pasting and mixing of code. If you're using one set of
sugar keywords, then in that same { } block you can't copy-paste
code that uses a different set of sugar keywords.

However you can copy-paste it into a nested block or a neighboring
block.

Interoperability is not a problem. Everything translates into the
same primitives, so they all communicate in the same way.

Library size is hardly a problem either. Sugar is just a translation
between neat and messy notation. Each keyword definition is tiny
and the number of keywords is very small.

Even so, nothing prevents that the standards body define a couple
of built-in sugar-keyword librares.

Essentially the result would be that the platforms would support
a few specialized programming languages for different purposes,
like there are in many fields.

But we would get dialects, so copy-pasting within the same { } block
does become a problem.

-- 
Ingvar von Schoultz



More information about the Es-discuss mailing list