News for hackers. Stuff that matters.
Re:An Anecdote About ML Type Inference (1994) by fizixer on Thursday August 20, 2020 @05:42PM (#24229361)
- SML is old

- OCaML has OO cruft and OCaML folks themselves keep telling you "Oh, you don't have to use the OO parts of OCaML"

Well then effin give me an ML that's more modern than SML, and has no OO cruft!

don't tell me "take this stuff that we think is good, and just ignore parts of it that are bad"

(and I'm not interested in Haskell).

edit: Matt Might lists only two other languages [0], Scala and Scheme. Both are not ML (though I think some folks think Scala is an ML?)

[0] http://matt.might.net/articles/best-programming-languages/

Re:An Anecdote About ML Type Inference (1994) by hajile on Friday August 21, 2020 @12:15PM (#24236159)
From a language standpoint, there are only a handful of features I would really like.

* something like JS backtick interpolation. Strings are hugely important in day-to-day coding for a lot of domains. Baked-in utf8 and Rune (utf32) would also be nice to have.

* Leading pipe in cases and `| foo | bar => expr` (maybe guards too, but they can be subject to abuse)

* Module Typeclasses which make it harder to create typeclasses everywhere like Haskell, but also does away with some ambiguities and the special case `eqtype` typeclass. SML has a way to add operators, but without typeclasses, it's pretty useless and unsafe. While we're improving modules, bake higher-order functors into them (they are already widely supported)

* Bake Concurrent ML into the official spec

As you can see, not too many things. In fact, about half of them (or more) are already supported in some SML implementations.

Honestly, all the "new" syntax/features in languages like Java, Swift, or C# just seem like attempts to kluge them one step closer to SML.

Re:An Anecdote About ML Type Inference (1994) by dragonwriter on Friday August 21, 2020 @12:27PM (#24236291)
> SML is old

At least three active SML implementations are working on implementing the fairly recent Successor ML spec (HaMLet S, MLton, and SML/NJ), so while SML has been around for a while, it's also an active language that's still moving forward. (HaMLet S is more of an experimentation platform than a production implementation, but MLton and SML/NJ are solid industrial implementations.)

Re:An Anecdote About ML Type Inference (1994) by dybber on Thursday August 20, 2020 @06:03PM (#24229561)
What is the problem with being old? I see the main problem with SML as lack of libraries and community.
Re:An Anecdote About ML Type Inference (1994) by fizixer on Thursday August 20, 2020 @06:11PM (#24229623)
I guess SML would be it then. I'm sick and tired of the OCaML community that tells you to use OCaML, as if it's better than SML, but then tells you not to worry about the OO parts.
Re:An Anecdote About ML Type Inference (1994) by bmitc on Friday August 21, 2020 @12:20PM (#24236205)
F# is the best modern ML in my opinion. It has OOP, but the style is to only use it when you need to or for interoperability with .NET. Even the OOP stuff is done in a concise way. I think it's useful to have. For example, one can have immutable records with member functions, and that's useful for doing operator overloading.
Re:An Anecdote About ML Type Inference (1994) by Benjmhart on Friday August 21, 2020 @07:41AM (#24234015)
Purescript is Haskell without cruft and built for the web era.

Idris or agda for type level goodies.