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 @pcwalton @whitequark
(Also add support for multithreading of course.)
1 reply 1 retweet 9 likes -
Replying to @pcwalton @whitequark
So, ReasonML plus multicore pretty much?
1 reply 0 retweets 11 likes
Haven’t heard of that, but a quick glance at the site looks like it’s pretty close?
-
-
Replying to @pcwalton @whitequark
Yep. Its a Facebook project, and they're aiming for JS-like rather than C-like but otherwise very close: https://reasonml.github.io/docs/en/comparison-to-ocaml.html …
0 replies 0 retweets 7 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.