Live data from Hacker News

1ML – unifying ML into one language

mpi-sws.org

11–20 of 63 posts

Re: 1ML – unifying ML into one language

#11
post #3
post #2

Classic https://xkcd.com/927/

This actually doesn't have to do with that. They "propose a redesign of ML in which modules are truly first-class values, and core and module layer are unified into one language." They're not trying to, say, unify SML and OCaml, they're trying to solve a problem inherent to ML itself.

Can you elaborate on why these are problems for ML?

Re: 1ML – unifying ML into one language

#12
post #3

Earlier quoted context omitted.

This actually doesn't have to do with that. They "propose a redesign of ML in which modules are truly first-class values, and core and module layer are unified into one language." They're not trying to, say, unify SML and OCaml, they're trying to solve a problem inherent to ML itself.

Can you elaborate on why these are problems for ML?

Erasing that distinction enables some goodies such as first-class type constructors, which makes it possible to manipulate types of higher kind. This in turn, presumably enables things like Generalized Algebraic Data Types.

Re: 1ML – unifying ML into one language

#13
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.

Re: 1ML – unifying ML into one language

#15
post #6

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

Scala is complex, and SML is pretty simple. (I haven't studied 1ML beyond the elevator pitch, which claims it's "minimal and uniform".) A very complex language with a large installed base can't offer simplicity.

Re: 1ML – unifying ML into one language

#16

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...

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.

Re: 1ML – unifying ML into one language

#17

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...

Alice ML, an SML variant that Andreas Rossberg worked on mid-2000, also has first class modules.

Re: 1ML – unifying ML into one language

#18
post #13

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 t…

I too prefer ml (I tried sml/nj) over ocaml, for it is very very tiny. It almost pushed my sexp/lisp fanatism away for a while.

Re: 1ML – unifying ML into one language

#19
post #13

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 t…

I taught myself OCaml first (err... 15 years ago? when there was some initial buzz around it) and liked it.

But then I discovered SML/NJ and I liked it more.

OCaml has an active community, and the language is nice. I think I actually prefer ML as a language.

Re: 1ML – unifying ML into one language

#20
post #13

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 t…

Are you referring to Standard ML, rather than the ML family of languages? 1ML is a new language in the ML family, rather than an extension of SML or OCaml.

Consolidating the module and expression languages in 1ML will lead to even cleaner semantics. From the abstract of the Andreas Rossberg paper:

> In this “1ML”, functions, functors, and even type constructors are one and the same construct; likewise, no distinction is made between structures, records, or tuples. Or viewed the other way round, everything is just (“a mode of use of”) modules.

Haven't had a chance to look at the demo yet, but hopefully functions/records/tuples can be sugared over syntactically into something resembling traditional ML. Otherwise we might end up with something like Java where there isn't much abstraction from the underlying OO mechanism, which makes code tedious and prone to boilerplate -- eg all functions (methods) must live in a class, even just to run main.

Post reply on HN