1ML – unifying ML into one language
mpi-sws.org
mpi-sws.org
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.
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.
None of the things that make a lisp a lisp prevent static typing. Some common constructs could be hard to figure out the types for, but they figured out the types of transducers so I doubt it is impossible.
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.
Is this a new kind of HN trolling? Instead of directly disagreeing with an argument on it's merits, you call a commenter out on possibly ambiguous terminology and use that to dismiss the entire comment?
Your entire lecture is true, but it does not apply to the sentence you quoted at all. That sentence is about some Haskellers' tendency to sacrifice readability in favor of better static checks. He could've written "difficult to understand" instead of "complex" and his comment wouldn't have changed meaning and your entire comment would've been void.
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.
In general, use of highly overloaded words is ambiguous in these discussions.
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.
https://realworldocaml.org/v1/en/html/first-class-modules.ht...
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.
I.e. ML's modules can be used to create interfaces and implementations of ADTs, but so can OO interfaces and classes.
File "types.mli", line 11, characters 14-15:
Error: Syntax error
make: * [types.cmi] Error 2
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.Granted, I haven't used Scala since, err, 1.7 days? I think. I liked it, and did a lot of work in it in fact, but more as an alternative to Java.
If I didn't have to worry about compatibility with Java or the proven nature of the JVM, or satisfy sysadmins and management with the orthodox Java-ness of my runtime, I'm not sure I'd pick Scala.
But I think it'd be hard to find an employer willing to pay me to work in it.