On Tuesday, 3 January 2017 01:14:57 UTC+7, Bob Zhang wrote: > > Hi Gordon, > Thanks for your lengthy reply. > I didn't try to convince you that OCaml is better than Haskell, they > are different styles : ). It just feel a little weird that "when you want > performance, you should switch from a statically typed language(elm here) > into a dynamically typed language(js)", a decent compiler should produce > much more efficient js output than hand written js, note that I have been > working on BuckleScript compiler for only one year, there are still many > low hanging fruits there and you can expect even better performance in the > near future. >
Oh, you don't need to convince me about statically typed languages as I dislike dynamic typing except (perhaps) for using in "quick-and-dirty" applications using languages such as Python. The only way I would use JavaScript would be to get its native speed, which is why I am looking for an alternative, and would much prefer that Elm would do it itself (reason for the thread), but it appears that will not be the case for quite some time. Its interesting that you feel you can get yet more performance out of BuckleScript. > Some minor corrections to your comment > - I am quite familiar with Haskell, OCaml, and F# (did 3 years research > in PL, I learned F# first, Haskell later and OCaml as the last one), the > expressivity of type system in my opinion follow as below: > Haskell ~ OCaml > F# >> Elm > Yes Bob/Hongbo, my learning progression was the same as yours: F# was first as an introduction to functional programming, then to see what the source of all the furor was about I learned Haskell (still learning the more advanced aspects), then heard good things about OCaml and knowing that F# syntax was somewhat derived from it, used it a little too but am nowhere near the stage of learning as with the other two. I just recently discovered Elm and decided to investigate whether it was at a stable enough stage to be able to use. > (OCaml has a fairly advanced object system with structural typing and > row polymorphism which is incredibly useful to build FFI to JS objects) > > Yes, I can see that OCaml's features, just if I were looked for maximum > flexibility of type system I would prefer Haskell, but it isn't really a > big concern for the kinds of things I would use Elm for, which system is > adequate. This is why I could accept Fable ever BucketScript if it were as > well developed as to ease of use and speed and stable even though not as > expressive just because I know it better and like its relative simplicity. > > - If syntax matters a lot, you may be interested in ReasonML, Facebook > are working on a new syntax for OCaml and it works seamlessly with > BuckleScript, some core ReactJS developers are also working on high quality > ReactJS bindings > I have heard of ReasonML and the others, but don't really want to learn another language; Elm was easy but that is what has turned me away from PureScript as well as PS not being as stable nor currently producing nearly as fast code. My intentions are pretty clear: find an implementation of a language I already know and like to compile to fast JavaScript for the critical code only until Elm improves. > Happy New York and enjoy your favorite language! > Happy New Year to you, and I'm still looking for my favourite language ;) -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
