Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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.


Every time I think of unifying various language features like this, I end up imagining that I'd just reinvent LISP and look like a fool...


That's often true within dynamically typed languages, but statically typed languages definitely don't feel Lispy. Moreover, messing with static type systems involves much more maths than hacking.


It is perfectly possible to write/use a lisp that is statically typed and still feels like a lisp. AFAIK the closest thing to this currently is shen http://www.shenlanguage.org/.

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 think that attempt was called Scheme.


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.


What the...? You know full well what kind of complexity the GP refers to, and it's not cyclomatic or algorithmic complexity, and definitely not unfamiliarity.

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.


> 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


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.


Accidental complexity is one of the biggest enemies of productivity in the programming world.


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.


I should add I also gave Haskell a spin and did not like it. While I can see its elegance, I found ML more readable and practical and easier to write. My eyes glaze over in Haskell, it's like it's missing punctuation or something to let me know what it's doing.


Totally agree with you own this one, just looked into Haskell code this week and it was too much black magic going on. I like ML (and more specifically OCaml) because it is more readable to me and easier to understand. Now this might change if I get more exposure to both worlds.


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.


I couldn't agree more. The power / complexity ratio for SML is very high.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: