3 ms·
In frontend? Not 100%, but pretty much.
by dukerutledge 11y ago
In frontend? Not 100%, but pretty much.
- Drup 11y agople-ase. Not everyone spends its time buzzing. The amount of people using Elm right now is a drop in the bucket compared to the amount of people using OCaml (and F#, in more recent years). Elm is a fun new language, it has cool features and its take on FRP is interesting, but I would really like its author to stop speaking like he invented fire. I would take js_of_ocaml + FRP over Elm any time, just for the size of the ecosystem and the overall expressiveness of the language.
- CodyReichert 11y ago> ... and the overall expressiveness of the language. We're looking at the same Elm, right?
- Drup 11y agoYes we are. You have to look at what you are competing against. OCaml has a much better module system (and a richer type system altogether). Purescript/Haskell got typeclasses and HKT, among lots of things. As I said, Elm is cute and interesting, but it's type system is less expressive than other languages and lacks features that I consider essential. Sure, it's better than javascript, but why not opt for the other thing that is even better, given that it also provides Elm's FRP goodness.
- ZenoArrow 11y agoIt's a trade off between functionality and user friendliness. You can currently do more with Haskell/OCaml/F# but Elm definitely has the edge when it comes to user friendliness. If that bothers you, just think of Elm as a useful tool in expanding the pool of functional programmers.
- mercurial 11y agoAs someone who thinks OCaml rocks (but hasn't tried js_of_ocaml), it's not terribly well marketed (on top of suffering from not being new-and-shiny). Also, making and distributing a single-page OCaml-to-JS app means learning about its build system(s) (the nicest thing to say about it is that it's not best part of the ecosystem), OPAM, etc. It's not really sold as a one-stop solution for new programmers. The other thing is that Elm comes with the "Elm architecture". A OCaml GUI app backed by the react FRP library comes with "here is an FRP library, figure out the best architecture yourself" architecture. There are other open questions such as "how can I combine this with the hundreds of thousand JS packages on NPM" and "can I use it with Webpack/Typescript/other trendy JS techs". That said, the possibility of compiling pure-OCaml libraries to JS is quite interesting.
- thinkpad20 11y ago> Elm is cute and interesting, but it's type system is less expressive than other languages and lacks features that I consider essential. I'd recommend watching this talk: [0]. Evan talks a lot about the decisions that went into the language, such as not having type classes or other advanced features. He makes a strong case for Elm not as a language-to-rule-them-all, but as a tool for the average programmer, who is more interested in building things than in learning about theory. The myriad language features in Haskell, OCaml, etc. are wonderful to those who understand them, but have not proven to be particularly effective at attracting those who aren't already interested in the languages. In that talk, he really made a strong case as to why Elm is valuable and relevant, even for someone such as myself, a functional programming nerd who loves learning about type theory, abstract algebra, and similar things. Also, I really don't think it's fair to say "The amount of people using Elm right now is a drop in the bucket compared to the amount of people using OCaml (and F#, in more recent years)." OCaml has been around for almost 20 years now, and F# for more than 10. Both have the backing of very large development teams. [0]: https://www.youtube.com/watch?v=oYk8CKH7OhE https://www.youtube.com/watch?v=oYk8CKH7OhE
- dominotw 11y agoF# is commonly used on the frontend?
- snuxoll 11y agoI'm using it in a WPF app I'm developing internally. Unfortunately all the frontend code is still very OO (I'm handling tens of thousands of records at once in a DataGrid, going full functional is not my idea of a fun time here) - but the sheer reduction in lines due to better syntax, better type safety and being able to actually use my F# backend code without everything needing a wrapper to interface with C# (without being horrible to use) is a nice benefit.
- Drup 11y agoI don't know about "commonly", but: http://websharper.com/ http://websharper.com/
- ghuntley 11y agoFor C# (and also to a lesser extent F#) check out the ReactiveUI framework which is a FRP framework for Xamarin (iOS and Android), Universal Windows Platform, Windows Phone 8.x, Windows Forms and Windows Presentation Framework. ReactiveUI is inspired by functional reactive programming and is the father of the ReactiveCocoa (Cocoa/Swift) framework. Rather than using mutable variables which are replaced and modified in-place, ReactiveUI offers "event streams", represented by the IObserver and IObserverable types, that send values over time. https://github.com/reactiveui/ReactiveUI https://github.com/reactiveui/ReactiveUI http://reactiveui.net/ http://reactiveui.net/
- aarpmcgee 11y agoThere is this http://funscript.info/ http://funscript.info/