I love OCaml as a language but we have to admit that the developer experience just sucks.
For something to be simple, a 10 year old kid needs to be able to figure it out. That’s how languages get adopted.
I love OCaml as a language but we have to admit that the developer experience just sucks.
For something to be simple, a 10 year old kid needs to be able to figure it out. That’s how languages get adopted.
(I feel obliged to give an example of what I think is a bad developer experience, and I would point at Haskell. There are far too many toolchain variations to choose from, all of which seem to be in active use -- cabal, cabal-v2, stack, cabal-v2+nix, stack+nix; ghcid, ghcide, etc. etc. Once your choices are made and your stack is configured, you'll be okay, except for the inordinately long build times. But in my experience, it can be a real nuisance to come back to a half-finished Haskell project -- say, on a new machine -- unless you've made a singular, personal commitment to a specific technology stack. Leave yourself copious notes, Makefiles, and shell.nixes to remember how to get the thing running! But this is a personal sob-story and a digression.)
My main argument -- which I think is being lost here -- is that Ocaml isn't IDE unfriendly, and especially not so unfriendly that an entirely new language is needed just so that FP and IDEs can happily coexist.
(Well, except for Windows. Ocaml + Windows is more unpleasant than it needs to be.)
Right, and I guess my counterargument would be that, yes it is, and you don't need to resort to logic to see it - just do a little googling about its poor adoption.
>Compare that to JavaScript where you can literally just install vscode and node and you’re up and running
As opposed to OCaml where you... install opam and merlin and you're up and running?
>Not to mention that you could pop open a console in any browser and execute code.
As opposed to OCaml where you can pop open utop and execute code.
>For something to be simple, a 10 year old kid needs to be able to figure it out.
How many 10 year old kids are there working as professional programmers? Come on...
Many of them in 10 years time, and they will be using concepts they learned when they were 10. And FP enthusiasts would complain why no one uses their favourite language.
My point is, if we want to get more people to use FP we have to make it more accessible. Everything from building better tooling, tutorials, environments. Good languages alone don’t matter.
You can’t tell me that it’s just as easy to get started with JavaScript or Python today as it’s to start with OCaml. That’s just delusional.
If you want to expose 10-year olds to functional programming, Logo [1] is a great place to start, and has been for decades. That's where I picked it up (I didn't know it at the time, but looking backwards it's now clear).
[1] https://en.wikipedia.org/wiki/Logo_%28programming_language%2...
Have you used OCaml? Because you can set up a complete environment with IDE support in like 5 minutes flat. It's actually one of the easiest environments to set up of any language. dune, merlin, opam, and utop provide everything you would possibly need.
That's only because VSCode was developed in JavaScript, and JavaScript is used in Browsers anyway. This has nothing to do with Intellisense friendliness.
In that case there are many functional languages with good IDE support. E.g. F# through Ionide.