
1ML – unifying ML into one language - g1236627
http://www.mpi-sws.org/~rossberg/1ml/
======
drudru11
I know this is not popular. I think ML has a clean syntax and simple but
powerful semantics. I enjoyed coding in it. It just looks better than OCaml.
Haskell is, I think, even cleaner, but there is a tendency for developers to
explore the possibilities available in Haskell and then increase the
complexity.

It would be great to see the ML community unify and provide an offering that
would give it the kind of support that we are seeing in OCaml and Haskell.

~~~
chongli
_explore the possibilities available in Haskell and then increase the
complexity._

I'd caution against referring to all such explorations as complexity.
_Complexity_ is a highly overloaded term in our field. Sometimes it refers to
the number of steps a given algorithm takes to compute (as a function of the
input). Sometimes it refers to the depth and breadth of a program's syntax
tree as well as its tendency to branch out and create cycles.

Sometimes it's mistakenly used to refer to concepts which are in reality
simple but merely unfamiliar or non-intuitive. This last usage is a big
problem for languages outside the mainstream which are trying to find better
ways of writing software.

~~~
munro
> I'd caution against referring to all such explorations as complexity.
> Complexity is a highly overloaded term in our field.

The difference between complex & hard, easy & simple has been put very
elegantly by Rich Hickey in Simple Made Easy [1]. That doesn't mean everyone
agrees with his definitions, which is why he revives the word "complected" to
mean objective interleaving of concepts, and pulls out "hard" from the way
people use complex to mean something one is unfamiliar with. I like his
definitions, so I use them. :)

> Sometimes it refers to the number of steps a given algorithm takes to
> compute

This can still create ambiguity since it could be either time or memory
complexity, but still easy to infer, especially if there's a big O.

> depth and breadth of a program's syntax tree

Lisp overloads the parens for difference concepts, which is complex. This
could also be hard if one's not familiar with the syntax.

> tendency to branch out and create cycles

Sounds like time complexity!

> Sometimes it's mistakenly used to refer to concepts which are in reality
> simple but merely unfamiliar or non-intuitive.

This is the ambiguity, is he saying Haskell complex because it has a lot of
interleaving with it's concepts, that other languages do not? Or is it just
unfamiliar? I would think it's simpler because it forces one to think about
how time interleaves the program, which could make things harder! I'm guessing
this is what the grand parent means, since ML is impure. Though, either case
is empty without examples.

[1] [http://www.infoq.com/presentations/Simple-Made-
Easy](http://www.infoq.com/presentations/Simple-Made-Easy)

~~~
chongli
Yeah, I've seen that presentation. Rich's ideas were what I had in mind when I
wrote my reply.

In general, use of highly overloaded words is ambiguous in these discussions.

------
vitriol83
Not sure if this mirrors his approach exactly, but ocaml does now offer
'first-class modules'

[https://realworldocaml.org/v1/en/html/first-class-
modules.ht...](https://realworldocaml.org/v1/en/html/first-class-modules.html)

~~~
ezyang
First class modules let you package up a module in the module level language
into a value, so you can pass it around in the expression language. But 1ML's
goal is to _eliminate_ the separation between the module language and
expression language. So, 1ML can do first-class modules, but first-class
modules do not mean a syntactically un-stratified language.

------
virtualwhys
Somewhat related: Bob Harper's, Future of Standard ML[1]

[1]
[http://www.cs.cmu.edu/~rwh/talks/mlw13.pdf](http://www.cs.cmu.edu/~rwh/talks/mlw13.pdf)

------
cwyers
Are the problems this is intended to solve problems that also affect F#?

~~~
platz
F# doesn't even have modules; although it's derived from an ML, it has cut out
rather important parts of it to make it fit into the .net ecosystem.

~~~
brandonbloom
You're not wrong, but I may phrase it differently...

F# lacks modules, instead favoring objects. Although it's derived from OCaml,
it has omitted complex features which don't fit in to the .net ecosystem.

~~~
riffraff
but is there say, something that (S)ML's modules allow which is not possible
to do with F#+.NET objects?

I.e. ML's modules can be used to create interfaces and implementations of
ADTs, but so can OO interfaces and classes.

------
faragon
I tried to build it (Ubuntu 14.04), but fails (OCaml 4.01.0) after calling
make:

File "types.mli", line 11, characters 14-15:

Error: Syntax error

make: __* [types.cmi] Error 2

~~~
doublec
It builds with 4.02.

------
ernsheong
Reminds me of 1Malaysia, Malaysia's political rallying call to unite
multiracial Malaysia :)

------
mafribe
Scala, whose modularisation was strongly influenced by ML, already offers most
of what 1ML is trying to do.

~~~
kvb
Could you justify this assertion? Here[1] is an analysis by Andreas Rossberg
that indicates that this isn't the case.

[1] [http://stackoverflow.com/a/23019436](http://stackoverflow.com/a/23019436)

~~~
mafribe
I was thinking about the statement

    
    
       1ML is a user-friendly surface syntax for System Fω 
    

in the paper's abstract. I think Fω lives inside Scala. But, as the
stackexchange article you cite shows, I should have been more careful in my
statement.

