-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Sep 27, 2005 at 10:23:16PM +1000, Erik de Castro Lopo wrote:
> QuantumG wrote:
> 
> > Erik de Castro Lopo wrote:
> > 
> > >You will notice that something like the Array.mapi function is
> > >much less likely to contain errors than the C for loop.
> > 
> > What I noticed is that they invented syntax when they could have just as 
> > easily have used C syntax.  Way to knife your language.
> 
> Nice troll or was it?
> 
> Actually, O'Caml is part of the ML family of languages Which is where
> it gets its syntax. The ML languages date back to the 1970s at which 
> time the C language was not yet even a teenager.

C itself started in 1972 which makes it quite comparable with ML,
however since we are tracing ancestors here:

  FORTRAN    (1954)
  Algol 58   (1958)
  Algol 60   (1960)
  CPL        (1964 ??)
  BCPL       (1967)
  B          (1970)
  C          (1972)

So the roots of C go back almost as far as electronic computers and
the language evolution was systematic and well considered at every stage.
Well, everything EXCEPT for the operator precedence which remains to
this very day, ALMOST annoying enough to fix.

If the ML designers were going to borrow syntax they only had a few
places to borrow from: FORTRAN, one of the Algol-like languages, LISP
or maybe APL. Borrowing from CPL or BCPL wouldn't have been entirely silly
even back then (although the smart money would have been on FORTRAN).


The thing about syntax is that people just can't be bothered learning
weird-syntax languages. Look at LISP for example, it's another really
old language (in computer terms) and it keeps trying to catch on but 
never will because the syntax annoys people and all the really cool ideas
of LISP have been absorbed into other languages by now. The thing that
LISP got wrong was 5000 years of humans using infix notation.

If you want another example, look at oaklisp (yes, go and search for it).
When you read the design documents you can't help realising, "hey, this is
actually Java," but oaklisp sat on the shelf being a great idea with no one
using it for about 10 years until Sun came along and reworked exactly the
same idea with a C-like syntax and suddenly it got popular.


In many ways, syntax means nothing because it really has nothing to do
with how a language works. On the other hand, syntax means everything
because that's what people first see when they look at the language and
that's what they have to stare at day in and day out. Think of a great
program with a crap user interface, that's what a language is with bad
syntax. Suppose I make a language where all numeric constants have to
be entered in base 9. There's nothing wrong with base 9, it's a 
perfectly valid form of numeric expression... but no one uses it.


        - Tel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iQIVAwUBQzvcn8fOVl0KFTApAQL4yxAAgJ2W1W+Q6rL7hXmc+NpWbxIxEazK97cG
bX67a03NjMxYmQxZIVq6IIl3g1XPmkCXeSAkueUM+2G8sylIqeLRyT/tfXw1vsst
d4TTbPm52ZR4a31nJ4SITDcmuiTFN+wCMjmBHFMzWDp3drBq4EWn7hiltAn790oX
VZpqphlqquoquMdcgCTFC0ffcRf5DdNSNPIXS4Xt5CZwUeLxi3e0fhw4OWKF6RaL
D0npcq65hWVKaYvF/oqtXugOixIlmksRZa4kH3rl9TZbPhZgy385RjRG4SNb1Y5A
sdSbZ4qpURNFdRzwRouvSeuWTiPDh84u2JWR1PWYbdZkzDL66VR81emWtcYWeY8p
6FaxTDBnUoVrrpjWX5ADwKOXXmfdOD241umJcVqeWi10oU7foENXfEoygLti53SC
rQ0hy+ks1ao1udpa1bgWV+cZRU+CKhAFFTHpQ8yPiqj/e1xv+bROcVhBeLI6fass
neShBVvA9hM671ZJxTwx0ImvwO/FoWWiQ11+8/SiZZcsvoD/lw3l77w04QGWE4aV
2qd4Gb9zJLFo1WWk/wDfZnZDpHfG8YPPgBiEWyCulTqM3bdwkcAdj4wYvGZfu01N
RBsds1a8HDmd+c7O52V++Cs2qBKysyo3re9M7ArZdAqdZGOUuXghqHyQ5W+tT8dR
pLCiBVTOJfk=
=5SLL
-----END PGP SIGNATURE-----
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to