4 ms·
Zig tutorials and learning materials and on-boarding experience needs a lot of work. Compare with something like Kotlin, so well designed is its introductory ma
by billfruit 4y ago
Zig tutorials and learning materials and on-boarding experience needs a lot of work. Compare with something like Kotlin, so well designed is its introductory material that one could start doing useful things with Kotlin within a few hours.
Also I find Zig's choice to use abbreviated keywords rather cryptic, for example using 'fn' instead of 'function' only hurts readability I think.
- schaefer 4y agoThe ziglings tutorial is pretty good! And if you go digging, I think you can still find solutions for last year’s advent of code.
- 3a2d29 4y agoZig 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.
- billfruit 4y agoTo 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.
- 3a2d29 4y agoIs 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.
- int_19h 4y agoSome examples would be Ada, Lua, Pascal (and derivatives like Delphi), XQuery.
- Existenceblinks 4y agoIsn't 'fn' pretty widely used as function? I've seen 'fn' the most among fun|func|fn.
- dralley 4y agofn is consistent with Rust, I think it's fine.
- alpaca128 4y agoAndrew Kelley said they'll only start writing the actual documentation once they hit 1.0 so they don't need to update it all the time. I personally find parts of the language unintuitive enough that I'll just wait. I don't get the problem with `fn`, though. Pretty much every language uses abbreviations like that and I've never heard anyone complain about it: enum, char, int, uint, def, ...you get used to it quickly, you need to build a mental model for them either way.
- billfruit 4y agoMay be 'fn' was a wrong example to highlight, but my general impression was that there was a preponderance of such abbreviations in Zig, as someone who has spent some time in Java shops, where abbreviations are largely avoided in naming things.
- auggierose 4y agoas in `freshIdentifierAvoidAbbreviationLargelyWhenNamingThings()` ?
- AndyKelley 4y agoThere are a lot of people in this thread saying that I said stuff I didn't say. It's maddening.
- alpaca128 4y agoI'm sorry if I misinterpreted or misremembered something you said, but this was my impression from an answer regarding the state of the stdlib docs, that there'll be more effort put into them after 1.0. If that's not the case (or maybe plans changed?) I stand corrected. It's definitely not my intention to spread BS.