Live data from Hacker News

What was wrong with SML?

blog.plover.com

11–20 of 82 posts

Re: What was wrong with SML?

#11

A bit off-topic, but could someone ELI5 what a lattice is in this context?

If you have two types, there should be a single type that "joins" them, in the sense that you can understand both of the original types as somehow being special cases of the join type.

A join is not necessarily a union, since the representations of the three types might be completely different, and also because the third type might contain many values that don't correspond to anything in the two original types. (It might be much bigger than the union.)

Mathematical lattices must also have "meets", which are like joins except down instead of up. I'm not sure that meets are as important as joins in this context.

Re: What was wrong with SML?

#12
post #2

What was wrong is not having a killer application or an industry giant pushing it. Grammar and language semantic are details regarding language adoption.

Yup, adoption has nothing to do with being a sensible language. More often it seems to be completely inversely related.

What are some sensible (coherent, load-bearing, force-multiplying etc) tools that have terrible adoption?

Unreasonably open-ended question (suppose the scope is ML, or perhaps FP in general, or maybe even wider) - but I'm very curious.

Re: What was wrong with SML?

#13

I mentioned to Mark when I saw this, and he noted it in the addendum at the end, that calling Standard ML dead is a bit too much. I've written recently [0] about how active it surprisingly is. I also disagree that its failure to "succeed" has anything to do with syntax or semantics and solely that it doesn't have a Jane Street or any company publicly behind it. [0] https://notes.eatonphil.com/standard-ml-in-2020.html

I would like to point out that the article does not use the words “succeed” or “fail”, and makes no claim about whether SML “succeeded” or “failed”. Indeed I don't think that is a useful question to ask.

My article was trying to address a much less nebulous issue: what problems did I personally see with SML in the mid 1990s that let me to abandon it at that time.

Re: What was wrong with SML?

#14
post #12

Earlier quoted context omitted.

Yup, adoption has nothing to do with being a sensible language. More often it seems to be completely inversely related.

What are some sensible (coherent, load-bearing, force-multiplying etc) tools that have terrible adoption? Unreasonably open-ended question (suppose the scope is ML, or perhaps FP in general, or maybe even wider) - but I'm very curious.

TLA+ or Nix comes to mind. By some notion of terrible I guess.

Re: What was wrong with SML?

#15
post #13

I mentioned to Mark when I saw this, and he noted it in the addendum at the end, that calling Standard ML dead is a bit too much. I've written recently [0] about how active it surprisingly is. I also disagree that its failure to "succeed" has anything to do with syntax or semantics and solely that it doesn't have a Jane Street or any company publicly behind it. [0] https://notes.eatonphil.com/standard-ml-in-2020.html

I would like to point out that the article does not use the words “succeed” or “fail”, and makes no claim about whether SML “succeeded” or “failed”. Indeed I don't think that is a useful question to ask. My article was trying to address a much less nebulous issue: what problems did I personally see with SML in the mid 1990s that let me to abandon it at that time.

Sorry, I didn't mean to put words in your mouth. I may just have gotten the wrong impression of your intent.

Any criticism of any language is valid and good to have!

Re: What was wrong with SML?

#16
IMHO Haskell's lazy evaluation has some significant disadvantages compared to SML's strict evaluation. In particular, lazy evaluation makes it difficult to find the performance bottlenecks in a particular piece of code or to determine the time complexity of an algorithm just by reading it.

Furthermore, subtle changes in how a function is written (for instance, making a multiplication function not evaluate the right operand if the left operand is zero) can cause wildly unexpected performance changes in that function's callers. In effect, the performance of a function is no longer just determined by that function's structure and by the function calls it contains; performance of one function now depends heavily on the implementation details of others and the context in which that function is used.

Granted, any optimizing compiler can have this effect, but it's rarely noticeable in strictly-evaluated languages, where at least to some extent the order of evaluation must correspond to the structure of the code.

Re: What was wrong with SML?

#18

A bit off-topic, but could someone ELI5 what a lattice is in this context?

It refers to https://en.m.wikipedia.org/wiki/Lattice_(order), with the elements of the lattice being the arithmetic types and the order relation being the subtyping relation here. Given any two types in the lattice, the lattice property then guarantees that there exists a unique common (least) supertype (aka upper bound, supremum) of the two types. Which means you can apply the binary operation (e.g. addition) as defined for that common supertype.

Re: What was wrong with SML?

#19
SML is one of my favorite languages (I've been (very) slowly writing a compiler & language server for it).

Sure, it has some warts/differences compared to newer languages - we have moved towards traits/typeclasses/etc, and I wish I could just write #[derive(Debug) - but I feel that SML fits in a very unique spot for programming languages. It's extremely simple, yet still powerful and expressive. I hope we will see continued work on SML/Successor ML descendants (like 1ML, etc), because I think there's still potential there

I think some updated language tooling would dramatically help.

Re: What was wrong with SML?

#20
post #12

Earlier quoted context omitted.

Yup, adoption has nothing to do with being a sensible language. More often it seems to be completely inversely related.

What are some sensible (coherent, load-bearing, force-multiplying etc) tools that have terrible adoption? Unreasonably open-ended question (suppose the scope is ML, or perhaps FP in general, or maybe even wider) - but I'm very curious.

Google "worse is better". :)
Post reply on HN