3 ms·
> Does OCaml still doesn't compile 1.0 + 2.0 or has that changed? I'm not quite sure what you mean? In any case, the compilation speed isn't really an issue (e
by mercurial 12y ago
> Does OCaml still doesn't compile 1.0 + 2.0 or has that changed?
I'm not quite sure what you mean? In any case, the compilation speed isn't really an issue (especially since we're talking about Rust, which last time I used it wasn't exactly fast).
- bam365 12y agoHe's probably referring to the fact that you have to use different arithmetic operators for int and float in OCaml, so it would have to be 1.0 +. 2.0
- mercurial 12y agoAh, that makes sense. It's still the case, but I guess it may be going away once implicits are released.
- edorrington 12y agoI think he's talking about the fact that OCaml has separate operators for floating point (i.e. in his example, you'd use 1.0 +. 2.0).
- swah 12y agoYep, that's <float><int><float> and doesn't typecheck since you missed it too, my point is made :)
- mercurial 12y agoYeah. Honestly it's a quirk, but I prefer quirks going this way than the other way (like universal compare). That said, all languages have warts. And that's the best kind of warts, the one that is explicit and happens at compile-time.
- swah 12y agoGood point. And to be honest, OCaml was the first language I used to have insanely fast compile times - and a REPL!