raould wrote:
> anybody have a feel of how hard it is generally hand-wavingly speaking
> to add type inference to a language (i have in mind an oo/functional
> one, actually, probably not just functional) later? as in, i'm not
> smart enough to do the type inference implementation (which probably
> tells you i shouldn't be thinking of making a language in the first
> place, but i'm ignoring that during this fantasy thinking stage) but
> don't want to create something which utterly precludes it, because i
> really value it. doesn't have to be HM, could be flow based a la
> Scala.
IMHO, type inference with automatic generalization (that Scala lacks) is
one
of the most valuable language features on offer. I would add full type
inference to a language first and OOP later as a consequence. Indeed,
unless the language has native interop with existing OO libraries (as F#
does), I would probably not bother with full-blown OOP at all.
> i do believe that overall creating a language is bloody hard, to
> balance all the things you want to accomplish. so i don't expect i'd
> really get anywhere, but on the other hand day in day out i'm always
> frustrated by every other language on earth ;-)
I think the hard part is getting a broad enough understanding of the
features already invented, where they clash and what the trade-offs are.
He's how I rank the current language designers:
.. F# are by far the best, integrating all of the best language features
for
a production-quality mainstream FPL. Leveraging .NET is an integral part
of
this and there are currently no alternatives (e.g. no tail calls on the
JVM
and no concurrent GCs in other VMs).
.. OCaml were good for 1990's academics but have since stopped innovating.
.. Haskell were almost as good as OCaml but sharing the same problems for
commercial use.
.. Scala are very poor, not understanding what other features are even out
there let alone what they are good for and how valuable they are (e.g.
they
sacrificed proper type inference so Scala suffers a catastrophic
productivity loss compared to ML, dragging it most of the way back to
Java/C#).
.. Lisp and Scheme were fine before modern static type systems were
invented
but they will never be suitable for mainstream software development (as
C++, Java and C# are) because they lack static type checking. At best a
new
development might achieve Python-like popularity but not without the kind
of syntactic improvements Mathematica offers.
--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u


|