Earlier quoted context omitted.
Is there somewhere one can follow the Mac and Linux ports? I'm stoked about F#/OCaml too.
Have you tried Mono and Monodevelop? I have used C# with Mono and for back-end work (non-GUI) and it works pretty well so far. I think they have F# support as well.
Why OCaml, why now? (2014)
21–30 of 132 posts
Re: Why OCaml, why now? (2014)
#22I think the author doesn't give enough credit to things that OCaml has that Haskell doesn't have: a powerful module system (ie, functors), polymorphic variants/subtyping, etc.
https://existentialtype.wordpress.com/2012/08/26/yet-another...
(although he doesn't mention OCaml, and probably has other, even better future languages, in mind)
Re: Why OCaml, why now? (2014)
#23> The first question I usually get ... is “Why not Haskell?”. > The answer is JavaScript. My current favorite language for this is Elm[1]. It compiles to JS, is based on Haskell, and has a few simple differences between either[2]. Elm doesn't let you use the tons of available Haskell libraries, and makes it slightly painful to integrate with JS. But it's the coolest thing for the web so far. And here's why: It uses a…
Re: Why OCaml, why now? (2014)
#24Earlier quoted context omitted.
Purescript[1] is also gaining some traction and even has a pretty nice looking book out. [2] It has some changes however; most notably it's strictly evaluated rather than lazy, and there are differences in how it handles type variables. [3] Personally though, I've grown more fond of F# than Haskell; I only wish the documentation for Websharper and Funscript was more solid. [1] http://www.purescript.org/ [2] https://l…
Elm is actually 3 things rolled into one: 1. an language very similar to Haskell 2. a set of runtime libraries 3. a technique for modeling a GUI as a declarative state machine PureScript only competes with #1 and #2 here. Where Elm really shines is #3, which #2 helps with a lot. Technically #3 could be done in any language. But it really helps to model it in such an expressive language with immutable data and no side…
https://github.com/paf31/purescript-thermite
https://github.com/kRITZCREEK/reactive-psc
https://github.com/bodil/purescript-signal
https://github.com/michaelficarra/purescript-demo-mario
https://github.com/mechairoi/purescript-frp-rabbit
To me, this is the benefit of PureScript - yes, you have to do a little more work, because you don't get these things for free from the compiler and tools, but you gain complete control over your application structure. You're not forced to work in some ambient Signal category.
Re: Why OCaml, why now? (2014)
#25Re: Why OCaml, why now? (2014)
#26I think the author doesn't give enough credit to things that OCaml has that Haskell doesn't have: a powerful module system (ie, functors), polymorphic variants/subtyping, etc.
Toolchains also matter and OPAM (the package manager) has gone from strength to strength since this post. It's the basis for the OCaml Platform which combines a number of useful tools and libs into a coherent workflow (making development much more productive).
Re: Why OCaml, why now? (2014)
#27> The first question I usually get ... is “Why not Haskell?”. > The answer is JavaScript. My current favorite language for this is Elm[1]. It compiles to JS, is based on Haskell, and has a few simple differences between either[2]. Elm doesn't let you use the tons of available Haskell libraries, and makes it slightly painful to integrate with JS. But it's the coolest thing for the web so far. And here's why: It uses a…
Re: Why OCaml, why now? (2014)
#28Now that .net is going cross platform, I see a great future of f# (another variant of ML family). Its got multi processors support too.
F# seems like a very nice language, but it won't really be compelling outside of the Microsoft bubble until it's divorced from the thick layer of Microsoft .CORP Brand Identity 2010, Visual Studio Visual Studio Visual Studio, and posts from Microsoft Outreach Engineers. Compare these two Stack Overflow "getting started with" answers for Haskell http://stackoverflow.com/a/1016986 and F# http://stackoverflow.com/a/1197…
brew install mono
run f# console/repl: fsharpi
compile files: fsharpc file.fs
Not sure about linux, but should be simple as well.
And as with Haskell and cabal, you have FAKE ( http://fsharp.github.io/FAKE/ ) which isn't exactly the same but similar
The main difference between those two answers is that for Haskell, the author pointed to generic Haskell resources while F# pointed to windows ones. I've been developing with F# for a while on the Mac and found no issues whatsoever. There is also MonoDevelop/Xamarin if you want a more complete IDE which is better than anything I found for Haskell (but there maybe new stuff I'm missing, having messed with Haskell in a while) but SublimeText and Vim work fine.
Re: Why OCaml, why now? (2014)
#29I think the author doesn't give enough credit to things that OCaml has that Haskell doesn't have: a powerful module system (ie, functors), polymorphic variants/subtyping, etc.
Also, provable performance properties are a big plus, caused by making lazy evaluation optional rather than mandatory. This aspect is explained quite well by Robert Harper: https://existentialtype.wordpress.com/2012/08/26/yet-another... (although he doesn't mention OCaml, and probably has other, even better future languages, in mind)
Btw, Haskell is technically not "lazy", it's "non-strict".
Now, I think he has a good point, but I don't think think there's any general consensus within the FP community which one of non-strict/strict is "better". Personally, I don't think there's a "right" answer.
Earlier on in my career, I would have said that "non-strict/strict" should have a part of the type of a term, but after non-trivial experience with O'Caml and Lazy.t, I'm not so sure. I'm definitely sure that it lead to an absurd proliferation of incompatible interfaces.
And, as SPJ has opined, laziness forces you to be honest about side effects, which is not a trivial thing!
Re: Why OCaml, why now? (2014)
#30I think the author doesn't give enough credit to things that OCaml has that Haskell doesn't have: a powerful module system (ie, functors), polymorphic variants/subtyping, etc.
There's a bunch of other nice features of OCaml such as named arguments, fast compile times, strictness, c-types, and reasonable records. To achieve (some of the feature in) Elm style "structural subtyping" records in OCaml you use the more verbose "object" keyword which is just a record with row polymorphism. Most choose to stick with standard records because they compile to more efficient code. I think the ML modul…
FWIW, I think type classes are actually what make Haskell more appealing to me than O'Caml, even though O'Caml's modules technically subsume type classes (for most purposes anyway). In practice it just gets too verbose.
That, and enforced purity.