Semantic complaint: "my thing is written in the language, not a compiler built-in" is a weak argument and I'd like to see less of it If the compiler is self-hosting, then builtins are written in the language also they just happen to be constexpr rather than runtime
-
Show this thread
-
This is motivated by "Zig fmt is in std, whereas Rust format! is a builtin". The format! implementation is written in Rust, and both languages use reflection to make it work. Rust's is done at compile time, and Zig's is done at runtime. this is not a strong flex.
2 replies 0 retweets 2 likesShow this thread -
Anyway my point is it's pointless to snipe at each other for "mine is in std" "mine is in the compiler" when both of them are still self-hosting constructs expressible in the language, when Go's "make" function exists
1 reply 0 retweets 2 likesShow this thread -
Replying to @myrrlyn
What does Go's "make" function do? A cursory search says it's a way to initialize values, but it sounds like it does something interesting.
1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
It's the only way to construct generic lists, hashmaps, and channels, because those aren't datastructures that can be written, generically, in Go
1 reply 0 retweets 1 like
Ah! Thanks for explaining!
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.