Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Zig isn't 1.0 so I assume more learning materials will come along once the language is actually finished.

I am not super familiar with zig, but I would say I am not a fan of using the entire word "function"

I believe "fn" is used in rust and I think its readable.

Maybe something like Go's "func" is better, but I really feel this is all arbitrary.



To my eye 'public function main' is a lot better than 'pub fn main'. It is also lot more clearer when you have to read out code phrases out loud.


Is there any language other than javascript that has the key word as the full "function"?

Again its personal preference, but I'm curious if there is a language you use often that makes you like that specifically?

Java is a bit like that, but has the C++ data types as its function key word basically. I'm trying to think if I am forgetting one.


Some examples would be Ada, Lua, Pascal (and derivatives like Delphi), XQuery.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: