If you think generics have to be complicated, study OCaml’s generics. In particular, check out how hash tables and binary trees work without having to deal with typeclasses. I can hardly think of a language that gets “worse is better” better.
-
-
Replying to @pcwalton
I don't like the polymorphic hash function all that much but it is a solution that would fit Go *perfectly*
1 reply 0 retweets 4 likes -
Replying to @whitequark
Exactly. In many ways, OCaml is a better Go than Go.
2 replies 8 retweets 41 likes -
Replying to @pcwalton
someone should just write a cross-compiler from Go to Cmm :P
1 reply 0 retweets 9 likes -
Replying to @whitequark
I’ve said for years that if you put me in charge of designing Go, I’d take OCaml, make the syntax C-like, drop the object system, do a few other minor cleanups, and maybe add userspace threading. Done.
8 replies 16 retweets 79 likes -
-
Replying to @mcclure111 @pcwalton
not really? Rust has typeclasses and monomorphization, OCaml doesn't, which simplifies it radically
2 replies 0 retweets 1 like -
(okay, first-class modules and existentials are like 90% of the way towards typeclasses, but we don't really need those in our Gocaml)
2 replies 0 retweets 4 likes
Right…I was assuming we’d remove functors too, or at least radically simplify them. Rust has no GC and a borrow checker, which wouldn’t be appropriate for Go’s domain. (I’m not a GC hater, contrary to popular belief) :)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.