On Saturday, December 31, 2016 at 8:09:28 PM UTC-7, GordonBGood wrote: > I see that BuckleScript would work fine for JavaScript output and OCaml > can be fast, but wouldn't int64 with two int's be a bit slow? It's just > that i prefer Haskell syntax and capabilities more than OCaml as it just > feels like a more modern language. I do like F# (and thus probabably > Fable), but it isn't as pure a language as Haskell. I think I'll see what > GHCJS can do for me, once I can get it installed. >
Unless you know any other way of representing int64 on javascript? An array of two integers is about the best you can do. Using a native javascript integer you get 32-bit. Using a native javascript number you get a 64-bit float (53-bits if I recall correctly of usable integer). Also, OCaml and Haskell are about the same age, although OCaml is based on the older SML, but as for the 'feel' of it there are two things to note: 1. OCaml's language is designed for fast parsing, like the code that Bob Zhang gave above compiles on 0.015 seconds on my machine here. Even very complex programs compile in seconds at most, compared to my 'usual' Haskell programs taking multiple minutes (or potentially hours on more complex programs that use a lot of HKT's). But near every decision of OCaml's syntax was designed to make for a *very* fast compiler (and elm was modeled as a mix of OCaml and Haskell syntax, see https://github.com/OvermindDL1/bucklescript-testing/blob/master/src/main_counter.ml as a working Elm example in OCaml). 2. There is a PPX (preprocessor 'essentially', but of the AST) called ReasonML that is OCaml with a fluffed up, more javascript'y (ew) syntax that many like if you want something more modern feeling, but it is still just OCaml. /me uses OCaml as their main static functional language on personal time What I am most curious in is being able to make self-contained custom elements in some functional language to javascript with ease. 'Almost' there with elm with that (can make elm into a custom-element, but cannot use a custom-element from within elm very well yet). Elm's subscriptions and registration approach would make making custom-elements (webcomponents) such a breeze once fixed up! ^.^ -- 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.
