Sobeston / zig.guide

Repo for https://zig.guide content. Get up to speed with Zig quickly.
https://zig.guide
MIT License
671 stars 173 forks source link

Add fundamental elements #128

Open km19809 opened 2 years ago

km19809 commented 2 years ago

I am very new to Zig, so I read this to learn the basics. But I think this is not fully self-contained yet. For example, there are no explanations about operators; Instead, this tutorial mentions some of them in other parts. So I have to find boolean operators from the official docs. There is no 'else if' too. Can you add these 'basics' to the tutorial, so we (newbies) can learn basics without official documents? I know these requests are too basic, and official documents are already helpful. But I believe the tutorial should be understandable without official documentation. I hope you consider my requests.

Thank you.

matu3ba commented 2 years ago

But I believe the tutorial should be understandable without official documentation.

The guide assumes

    Prior experience programming
    Some understanding of low-level programming concepts

Did you try ziglings https://github.com/ratfactor/ziglings which does not make this assumptions?

km19809 commented 2 years ago

After much time passes, I feel more confident on zig now. I do not think they should be explained.

However, I still think that some common operators would be introduced. In other words, they should appear in the example codes. Because the forms of operators and keywords vary.

Some languages use and and or as logical operators. Python has a keyword that represents the else-if clause. Of course, these cases are exceptional. But I want to say that some prior experience can be more confusing. In my case, I was new to zig, but not to programming. I already know languages such as C/C++, Python and Rust.

I am not saying that the tutorial should explain all the basics. I just think that It will be helpful, if the tutorial give some hint. ex) an example which contains multiple conditions.

I am not fluent in English, so I am afraid if this comment is awkward.