Template Metaprogramming Made Easy (Huh?)

Justin Johansson procode at adam-dott-com.au
Fri Sep 11 04:57:24 PDT 2009


> Ok, so you did not like optional semicolons.
I don't like needless options and that was one example that I picked.  (Hope D is listening too.)

> > 3. Half-baked embeddable XML support in the language looks like she
> > borrowed from ECMAScript's E4X.
> Ok, borrowing features is bad.
Not at all. E4X is not a model that I would borrow from (and acknowledge Scala probably did its own thing independent of E4X anyway).  My preference would be to leverage the W3C XML stack to better advantage if I were to meld XML together with a new PL.  There is too much impedance mismatch between general purpose PL's and XML processors whether they be parsers, schema validators, XSLT or XQuery processors.  A heck of a lot of pain-staking work has gone into creating the XPath 2.0 Data Model (XDM).  Its a solid model which underpins XSLT 2 and XQuery and leverages XSchema Data Types to excellent effect. It's a work of some fine academics and domain experts, well worth borrowing from and not worth reinventing in a non standards-compliant way.  So if you are going to support XML as a first-class citizen in a PL it makes good sense to base the XML part of your data model/type system on XDM.

> > 4. Too many different ways of doing things.  All very interesting and no
> Examples? I can tell you that D has too many looping constructs: goto, 
> for, foreach, foreach_reverse, do-while, while, recursive functions, 
It's how I felt at the time .. 6-9 months ago .. memory has a tendency to fade when you decide to move on.  I'm far from expert at D yet, but, agree, "foreach_reverse" appears somewhat alarming.

> > 4. Way too much of an academic approach to language design; appears to
> Ok, academic research is bad.
Again not at all.  Academics do what they are good at which is research. Engineers and technologists apply that research to make consumer-ready products from which the public benefit.  There's no doubt that the research behind Scala will be to the benefit of the evolution of programming languages in general.

Further, I'd much rather see universities teach Scala in CS courses in preference to any of C++, Java or D.  The latter are all something one can learn on the job if they have a good founding in the fundamentals.  Since Scala's designer studied under Nicholas Wirth, arguably Scala is the successor of Modula-2 and Pascal (two languages developed by Wirth) and it wouldn't be any surprise if Scala becomes the next teaching language.

My original point was that Scala being in my opinion too academic, was not for my developer's taste; not that anything academic is bad.

> 'Programming in Scala', which is much better a starting point as the 
Yes I read it.

> > 5. Not her fault (i.e. of the language), but after six months of
> > courting Scala with the Eclipse plugin, suffering IDE crash after crash
> > and lost code I just could not bring myself to suffering her any longer.
> 
> When Descent was new, it also sucked. It used to hang badly when it 
> parsed partial code, like when one did not yet have a closing bracket for 
> arrays. The Netbeans plugin for Scala is more stable.
Fair comment.  Often it's the luck of timing when you decide to dive into something new.  If people want to try out Scala I'd recommend the Netbeans IDE also if not otherwise tied to Eclipse.  My interest at the time was with Eclipse RCP so admittedly using a different IDE wasn't something I was too keen on.

Anyway, thanks for your comments on my comments .. all in the spirit of good debate.

Cheers
Justin




More information about the Digitalmars-d mailing list