I have this book, there's interesting chapters like defining arithmetic recursively in SML. You can do this book without previous programming assuming you have domain knowledge to install SML yourself.
There is no answers to the exercises in the book (some selected solutions on the book homepage) but there is an appendix on various patterns and proof techniques, which turned out to be all I needed as many of the exercises you're just writing and checking a program. I assume there's no solutions because the exercises are used for a course. I've always wondered why authors don't have a self-study, Knuth like book with answers contained in it, then sell a seperate instructor pack or something with private exercises to other teachers.
Which is nowhere in the book, it's only referred to as "ML language" so requires assumed domain knowledge such as (1)ML = Standard ML = SML/NJ (2)you know what a REPL is and that it has different commands on different platforms (Ctrl-Z to exit on Windows VS Ctrl-D in *nix) (3)you know commands to load your larger .sml programs into the REPL and all the pitfalls like needing to restart/empty the environment. In the course it's explained but not the book http://cs.wheaton.edu/~tvandrun/previous/spring19/cs243/ml.h...
I took this course from the author (with a draft of the now-published textbook—I'm in the acknowledgements for proofreading help) and thoroughly enjoyed it. I hadn't thought I was much of a math guy, but it made set theory and proofs and very basic modern algebra seem interesting and intuitive. Not sure what else there is to say, but I'm happy to answer questions.
I can definitely vouch for the quality of this course and textbook. It's one of the favorites in the CS program at Wheaton, and Dr. VanDrunen teaches the course extremely well!
The textbook does a good job of balancing the discrete math parts with functional programming and relates the two in a way that helps build your understanding of both.
1. Functional programming is popular in academia (particularly in PLT) but so is just about every sort of programming. Lots of academics have carved out niches and worked on them for long times.
2. Your view of industry is somewhat biased. In the sort of tech companies talked about on HN (eg Bay Area style companies), functional programming methods are growing in popularity but it isn’t really functional programming languages but certain functional programming techniques (in particular mutating this as little as possible and in particular not all over the place). Outside of such companies everyone still uses java, C, C++, C#, or JavaScript with some people using react now which is somewhat popular.
> it isn’t really functional programming languages
Except that the goalposts keep moving all the time. It used to be the case that having first-class functions was enough to be considered FP, but even function objects in C++ or Java give you that. Then it was "no global mutability" - restrict mutation to a single well-defined "context" of execution (via things like the ST monad, in a functional language like Haskell) and make sure that anything that's shared more broadly is immutable. But Rust has now codified that rule-of-thumb as well, and with it the comprehensive use of such a "sharing or direct mutation, but not both" pattern. It will be interesting to see how this evolves in the future.
I don’t really want to say what is and isn’t a functional programming language. However I think it’s pretty clear that c++ and java are not particularly functional and that the next version adding traditionally functional features does not convert one’s legacy codebase into an FP program. It’s still the non-FP program it was before.
I don’t think this was ever really about first class functions (by which you really mean closures): C already had function pointers and a common pattern of function pointer plus a void * for some data which effectively gives you closures without the syntax. And java already had the ability to mint a class inside a function which closed over (final) variables which is basically the same as a lambda. Saying that functional programming means lambdas is like saying that FP is the same as having GC (or good static types, or dynamic types, or lots of parens, or ...). This isn’t true (again, see java, but when it was new) and there are examples of languages in each quadrant of the FP vs GC square.
The fact that C++/Java are picking up features from functional programming languages is sort-of irrelevant. I think it makes more sense to say that they are picking up useful features from all sorts of programming languages
My main point in this area is that despite the mood on HN, most programming done in industry is with the same big existing procedural/oop programs that have been around for ages and are likely not going to dramatically change or be rewritten just because FP has been coming back into fashion in the last 10 years. And the new programs written in industry will probably still be in the same languages to interoperate with the old programs (although perhaps written in a slightly more functional style depending on who writes the programs and which libraries they use).
Having said that I’m less sure about JS. I get the impression that it’s tending to a more functional style as a solution to managing complicated state and user interfaces, that many programs are written with new functional style libraries like react, and that programs are less likely to be old and big and more likely to be frequently rewritten. But maybe this impression is wrong and most JS programs are just using jquery.
Two actual changes are I think moving towards web based UIs instead of platform native ones, and moving to json instead of xml. But these have little to do with programming languages.
There is no answers to the exercises in the book (some selected solutions on the book homepage) but there is an appendix on various patterns and proof techniques, which turned out to be all I needed as many of the exercises you're just writing and checking a program. I assume there's no solutions because the exercises are used for a course. I've always wondered why authors don't have a self-study, Knuth like book with answers contained in it, then sell a seperate instructor pack or something with private exercises to other teachers.