Hacker News new | ask | show | jobs
by emschlr 1584 days ago
Exactly! I don't understand why modern languages can't make "print" simpler. Is it too much to ask to expose a print function in the default namespace?
1 comments

It is too much to ask for because Odin is not trying to optimize for beginners nor is it trying to pollute the global namespace with things that require a large runtime. Odin is a systems level programming language and you may not want to use such a feature that uses RTTI in the first place.

Is doing `import "core:fmt"` or something else too much to ask for?

I just want a language to meet me half way. Very little is “too much to ask for,” but why not eliminate boilerplate? If it’s a special case, I will sacrifice a goat to the gods of engineering purity and hope they forgive me.
if you really care about that so much you can create an alias procedure with a different name and use that throughout your package

import "core:fmt"

print :: fmt.println

// you can use print("test") now