5 ms·
I'm currently looking for the language and framework to use for a project, and I'd like to go with a functional language. I really, really want to do my next p
by raphinou 8y ago
I'm currently looking for the language and framework to use for a project, and I'd like to go with a functional language.
I really, really want to do my next project in Ocaml, but... I find the ecosystem seriously lacking. You find Ocaml libs for a lot of needs, but a lot of those a unmaintained and have their last commit a couple of years ago. I'm afraid that choosing Ocaml would mean spending quite some time on libraries I need, and less on the app I want to develop.
There's F# and the SAFE stack, but I don't feel home there. A lot of docs/libs still are (or have quirks due to having been) Windows specific, and joining the most popular f# community communication channels requires you to join the F# Software Foundation....
Then there's Scala, with functional programming and access to Java's ecosystem. But I prefer the ML style of Ocaml and F#.
- gabipurcaru 8y ago> You find Ocaml libs for a lot of needs, but a lot of those a unmaintained and have their last commit a couple of years ago. Not sure what issues you ran into, but this isn't necessarily a bad thing. I had a similar experience with Elixir, where some libraries had been last touched two years ago, but did the job with no issues whatsoever.
- raphinou 8y agoWell, one example is oauth in ocaml. I find this https://github.com/jaked/ooauth https://github.com/jaked/ooauth but it has an open issue from 2013 titled "Fix compilation on recent ocamlnet, gcc". I have the feeling I encounter a lot of these situations when I look at libraries I would need for a project. It's rather uncommon I see a very active project in Ocaml (even if there are some indeed).
- donatj 8y agoThis is something I see and feel often. If something is untouched, that doesn’t mean it’s broken or for that matter unmaintained. It can simply mean it was simply done correctly from the get go. Think of code as a formula, how many formulas are there that haven’t been touched in hundreds of years, due to the fact that they are correct. The desire for libraries that are constantly in flux stems from the “move fast and break things” mentality, mixed with the continuous flow of breakage in mutable languages. If you move slow and do things well, you can often build some reliable with a fraction of the effort.
- thrower123 8y agoI would agree. I'm happier using a stable, rarely changing library than something that is in constant flux and changing every week. Really, that kind of breakneck pace signals to me that people are just throwing stuff at the wall to see what sticks, and reduces my confidence in the quality of the product...
- yodsanklai 8y agoAnother issue with OCaml is that the community is small (although helpful). If you have very specific questions (esp. on more recent development), it may be hard to find help on Stack Overflow for instance. Besides, the language has became quite complex: Monad-based concurrency and error handling, functors, objects, GADT, PPX... it's cool from a language point of view, but as a developer it can get overwhelming. You don't have to used all of this in your project, but still you may have to deal with existing code that is quite complex.
- progman 8y agoThe people at https://discuss.ocaml.org/ https://discuss.ocaml.org/ are quite helpful. > it's cool from a language point of view, but as a developer it can get overwhelming If you consider OCaml's features overwhelming why don't you consider a much simpler language (Typescript etc.)? I am learning OCaml myself right now, and I only use the features which I currently need. If I need more I will learn OCaml's suitable features then. Btw. I like OCaml, after having tested Haskell for a while. OCaml feels like a really practical usable "Haskell light". The compilation speed is outstanding (like LuaJiT).
- nestorD 8y agoMy ML of choice is F#, I came from OCaml because I wanted better tools, librairies and an improved syntax. The only place where I suffer from windows only librairies is UI and graphics in general (I don't do web developement so I cannot comment on that) otherwise developement on linux feels good (first via mono and now dotnet core). Without the heaviness of dotnet (and, in particular, its project files), it would be perfect.
- raphinou 8y agoAs you have experience in both, are there Ocaml things you really miss in F#? How long are you developing in F# (and which type of apps if I may ask)?
- remify 8y agoFYI F# started as an OCaml implementation to .NET. It quickly evolved as an independent languages as it was easier to do, but a good part of it is straight up OCaml.
- nestorD 8y agoI have been using F# for data science, developing algorithms (where ML truly shines) and most of my scripting needs for 3 years now (it is not my main language as, these days, I need to instrument some C++). As remify said F# came from Ocaml : it lacks modules, GADT and other thing but you can easily translate most Ocaml to F#. For me the syntax was a net win. The thing I miss is the Graphics module of Ocaml's std. I used to build quick visualizations with it and I have not found a good F# equivalent that would run flawlessly on Linux (the relevant section of mono's std was very buggy the last time I tried using it).
- hardlianotion 8y agoBut now there is no need to rely on Mono, right? Now that Microsoft has released dot net for other OS.
- 8y ago
- mamcx 8y agoI'm doing F# from 2 years ago ONLY on OSX. Use .NET core & xamarin currently. So far I can do a fairly complex project with dozen of external libraries, for iOS/Android/WebAPI with PostgreSQL, Sqlite. Deploy with docker on Ubuntu. Today I say F# is good enough on *nix. Also doing a little of Rust but the productivity with F# is far higher (you need to ramp up on Rust for a while!)
- christophilus 8y agoLast I checked, F# on Mac still requires mono for development, its repl is super janky, and its tooling is all over the map. Have things improved in those areas in the last year or so?
- mamcx 8y agoMono is required, but all my libs are on .NET Core now, so is only as part of the deal. I use Visual Studio Mac. The repl is not great, even on windows. F# is not the kind of language for a great repl experience, imho. I rarely use the repl anyway (the only one I use regulary is the python one)
- int_19h 8y agoConversely, Windows does not look like a well-supported platform for OCaml (in fact, it looks worse now than it was a few years ago). There's no official Win32 package or installer; the website just directs you at third party ones. And you have a choice of an experimental OPAM build that requires Cygwin (and needs a forked repo to install packages from, that upstream package authors don't necessarily maintain), or OCPWin that is stuck at v4.01. It's not an arrangement that inspires confidence - it feels like the community in general really doesn't care about Windows, and it's a few people trying to keep it afloat there - but if they step back, it won't keep.
- Barrin92 8y agoGive clojure a shot. It's mature, expressive and you have access to the JVM.