Re:Odin Programming Language
by emschlr on Saturday February 19, 2022 @12:37AM
(#30394694)
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?
[ Parent
| on HN ]
Re:Odin Programming Language
by gingerBill on Saturday February 19, 2022 @07:46AM
(#30396731)
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?
Re:Odin Programming Language
by kwertyoowiyop on Saturday February 19, 2022 @08:37AM
(#30397037)
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