Right, I promise (hand on heart) that this will be the last time I say anything about SML. I’m sure it’s all bored you lot (which is why this is a static page rather than a blog entry) so I won’t say anymore about it……after this.
I just have a few things to say to purge my opinions having finished working with SML (for good).
SML isn’t a bad language. It’s (mainly) functional and if you like functional programming or think in a certain way you will probably like it. It’s very elegant and neat, things happen in a few lines and you can do some very clever stuff.
The best things I liked about SML were:
-the map function: you write a function that applies to one element of a list and the map function will give you a function that applies that to the whole list
-curried functions and partial instantiation: also quite handy. Curried functions allow you to partially instantiate things (i.e. you can pass parameters one at a time (which is a great deal more useful than you would think).
I think it’s good points are also it’s bad points. I don’t care about elegant code and hence it infuriated me when my project supervisor went all starry-eyed about how wonderful SML is. The fact you can do stuff in a few lines is very cool; it’s also very confusing. Setting something out in a longer-winded way can often lead to code that a larger number of people can read and understand.
One of my other problem with SML was that I had to learn it before I could use it. This inevitably meant that I didn’t use the fancy stuff that SML can do but something like C++ (or dare I say it Python (think higher-order functions other than map)) can’t.
Now having finished talking (well…mainly complaining) about SML as a language – I have a few other problems.
1) The documentation is crap. It’s fairly non-existent. Most of the stuff on the web is also pre-1997 when there was a big change in the language and hence it’s useless. Nobody tells you this though! If anyone reading this has to learn to program in SML – buy a book
2) You can’t do anything with it – No-one writes APIs (interfaces to programs) for SML. Also there are two systems available to make GUIs – both are appalling, particularly the ones the SML website wants you to use. They both appear to be ‘proof of concept’ rather than anything anyone is expected to use. Anything that is written for SML (including the Gui systems) has the documentation issue too (see 1)
3) It’s only used by academics – perhaps this is the root of all the other problems. In essence, nobody writes about it, nobody uses it and even if somebody did use it they couldn’t do anything with it.
Basically my problem with my project was that I see no point in using the language I was being forced to use. I didn’t use the fancy stuff and that is the only reason to even think of using SML
Sorry for the the long rant. It’s my last on this subject I promise. Happy programming, live long, prosper and don’t use functional languages.