3 ms·
Features such as? Do you know how these features interact with each other? Why are we not using OCaml or standardML or even F# (which I tend to look favorably
by aatd86 2y ago
Features such as?
Do you know how these features interact with each other?
Why are we not using OCaml or standardML or even F# (which I tend to look favorably on) more widely then?
- IshKebab 2y agoFeatures such as type unions. The topic of this conversation. > Why are we not using OCaml or standardML or even F# (which I tend to look favorably on) more widely then? In my opinion there are a number of factors. I have most experience with OCaml, so on that: 1. Terrible Windows support. 2. Poor documentation. 3. An obsession with linked lists and recursion, which are great from a theoretical point of view, but abysmal from a performance point of view (and also simplicity IMO). 4. Poor syntax. The dearth of brackets and semicolons makes it very hard to visually parse. Something as simple as mismatched brackets can be very frustrating to resolve. The insistence on (a -> b -> c -> d) style function types is unnecessarily confusing. Generally when there has been a choice between academic cleverness and accessibility they've always chosen cleverness. 5. Global type inference is pretty clearly a mistake at this point. IMO part of the reason Rust is so successful is that it has taken a lot of the very good ideas from ML and basically fixed all of the above issues. Standard accessible C style syntax, but expression based and with proper ML style types. Fantastic documentation and Windows support. No linked lists to be seen. It's such a compelling design someone copied it for Go: https://borgo-lang.github.io/ https://borgo-lang.github.io/
- aatd86 2y agoOk but I guess once again we end up at rust. Rust has its fair share of corners and weird syntax. It also has missing features so to speak. Go evolves at a more cautious pace, and is actually more successful. To the extent that rust also borrowed from Go. The point is not even comparison but I'm still unconvinced about the whole, ignoring everything. Minimalism, caution, and starting from first principles with a clean slate is obviously the right choice.
- IshKebab 2y ago> Ok but I guess once again we end up at rust. Yeah I guess because it is really good. > Rust has its fair share of corners and weird syntax. True, but IMO they're in smaller bits of the language, like trait bounds. Not something as basic as blocks, function calls or variable declaration. > Go evolves at a more cautious pace, and is actually more successful. To the extent that rust also borrowed from Go. Go is more successful because it is older. Give it a few years. I actually don't know of a single feature Rust has borrowed from Go. It is not even listed as an influence: https://doc.rust-lang.org/reference/influences.html https://doc.rust-lang.org/reference/influences.html > Minimalism, caution, and starting from first principles with a clean slate is obviously the right choice. Throwing away learnings from other languages is pretty clearly a bad choice IMO. It would be like creating a new language where everything is nullable... oh.