I had a different experience with the idea of the functional programming paradigm. Also, I think now the most popular programming languages are starting to incorporate functional elements: e.g., C++, C#, Java. That and the existence of F# and Scala might lead many programmers to be intrigued by the idea of functional programming. But, OTOH, they might still think OCaml is exotic or academic.
I think the selling point of OCaml is that the language and compiler facilitate a less bug-prone programming method and help to catch more bugs. There are probably other selling points.
My experience was that I had been using C and C++ for some years and kept seeing the same kinds of bugs and especially the same kinds of hard-to-track-down bugs. I thought there should be a better way. I read a book Symbolic Programming in Lisp and Prolog in which the authors were interested in a better way to program that they called “denotational” and tried to illustrate with Lisp and Prolog. I tried to put some of that into practice in mainstream languages, but it wasn’t too helpful or I didn’t understand it well enough. Fast-forward to several years ago. I went back to school for my master’s in computer science. I had been impressed with Prolog, so I took a course called “advanced programming languages”, but the main language taught turned out to be OCaml.
That course completely altered my view of programming. It was as though someone turned on the lights in a dim room, and I saw things clearly that I could only make out dimly before. I started making more use of C++'s functional features in my work. I used it’s type system to make guarantees about things like not-null and that errors had been checked, I used “const” all over the place, I learned how to use enum and switches without defaults to get the compiler to warn me when not all cases were handled, and I started using template metaprogramming (I know that is controversial) to handle other things at compile time, and perhaps other things. It made a dramatic difference. I happened to be working on a server project that required robustness at that time, so it was that much more consequential. That was also around the time of the Heartbleed bug.
I saw OCaml mentioned in articles as a possible antidote to the problems that led to Heartbleed, but I also saw Rust, and because I was a systems programmer, it was more attractive to me.
I probably would have learned Rust (beyond little bit that I did) if it hadn’t been for getting the job that I started about 2 years ago. We use OCaml, so I had to learn it. Now, I wouldn’t want to do without the garbage collector and the type inference, unless I really had to.
I think it’s true that one thing that people should know about OCaml is that they can just as well use imperative style. They are not trapped into any exotic or academic mode of programming. That is probably true.
Another thing that might have attracted me more to OCaml (or diverted my interest from Rust–if anything could have) might have been seeing more open source uses of OCaml. Even though I’d used OCaml before, I did have the feeling that it was a language that not many people were using and maybe even a bit esoteric. I was skeptical of the claims that it was a fast language and useful for systems programming, too. I don’t know what else could overcome prejudices like those, though.
For some academic open source code I wrote a few years ago, I selected Python, even though I also considered OCaml and Rust. I wanted it to be widely readable and modifiable by casual programmers. I wish OCaml could be so easy for casual use as Python, but I don’t know how to get to that point.