Re: beginning with ML



David B. Benson wrote:
On Nov 5, 6:56 am, "michele.simion...@xxxxxxxxx"
<michele.simion...@xxxxxxxxx> wrote:
Which implementation would you recommend for a beginner?

O'Caml is somewhat different and less clean language that Standard
ML...

OCaml is also a far more powerful language though. Here's a list of some
really useful features added by OCaml:

.. Pattern guards
.. Or-patterns
.. Lazy stream parsing
.. Macros
.. Polymorphic variants
.. OOP
.. Labelled and optional arguments
.. Private types
.. Ad-hoc polymorphic printing (printf)
.. Array literals
.. Can export infix operator definitions from modules
.. Capitalized type constructors
.. Module hierarchy can be reflected in source directory structure
.. Conventional unary minus
.. Extensive currying in the stdlib
.. Mutable record fields
.. Structural types
.. Recursive types
.. Higher-order functors
.. "open" allowed in signatures
.. Standard integrated build tool
.. Portability of a substantial subset to .NET thanks to F#
.. Lightweight and efficient FFI with auto codegen
.. Lots of documentation
.. More libraries than SML
.. Wider use in industry
.. API browser and IDEs with type throwback
.. High-performance interactive mode
.. Actively developed
.. Polymorphic structural equality, comparison and hashing

SML adds a few features not in OCaml:

.. Equality types
.. Single notion of equality
.. First-class type constructors
.. User defined precedence and associativity of new infix operators
.. Ad-hoc polymorphic arithmetic operations
.. Immutable strings
.. Anonymous record types

The only one I value is equality types but F# has an even better solution to
the same problem.

F# also has a wide variety of features not found in SML and does an
excellent job in carrying the enormous productivity boost of using a
language like OCaml to the .NET platform.

I'm only just learning Scala but my impression is that its design diverged
much too far from core ML and, consequently, it fails to capture the
productivity boost.

--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?u
.



Relevant Pages

  • Re: Strengths of Standard ML compared with more recent FPLs
    ... and then possibly continue with another language. ... curious about possible advantages Standard ML may /still/ have over more ... SML has equality types whereas OCaml lets the programmer incorrectly apply ...
    (comp.lang.functional)
  • Re: What computer languages are standardised?
    ... OCaml and SML may be an interesting case study. ... The SML language has not changed in many years ... Perhaps having a standard gives people more faith in a language. ...
    (comp.programming)
  • Re: Strengths of Standard ML compared with more recent FPLs
    ... and then possibly continue with another language. ... curious about possible advantages Standard ML may /still/ have over more ... recent functional programming languages such as OCaml and Haskell. ... SML has equality types whereas OCaml lets the programmer incorrectly apply ...
    (comp.lang.functional)
  • Re: About alternatives to Matlab
    ... lifting scheme, while yours is a classic convolution based approach. ... I've done both in OCaml. ... Using a compiled language ... We are talking about this Python implementation, ...
    (comp.lang.python)
  • Re: Verbose functional languages?
    ... They are both working around deficiencies in the language using functors. ... Users of languages like SML and OCaml should not have ...
    (comp.lang.functional)