-
-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add conditionals into Nix Language Basics tutorial #1079
Comments
Yes, I originally made the decision to skip conditionals because there's really not much to say about them for the purpose of being able to read the language. In real-world code you rarely find But since it's been brought up a couple of times now, I can imagine that maybe we mention it but still not go into detail to keep the noise down. What do you think about #1082? |
btw, thanks a lot @ellyxir for bringing up these issues and making improvements! A lot of learners and new users will benefit from those, I'm sure. :) |
What about having a section saying that conditionals are unsurprising, to at least mention it and give a simple example 🤔 Something that could be surprising tho' coming from imperative language is that the |
Yeah that's true and probably worth mentioning. I'm still not sure if it's worth an entire section though, and if it is, where to put it. Feels weird to squeeze it somewhere randomly in between. |
That would have worked, I like that its near the beginning because I did a search for 'if' and it would have shown up early, thank you! Feel free to close this issue. |
Thanks for the feedback! |
Observations
After finishing the language basics, I thought about writing some basic code and realised that I didn't know how to use any conditionals. I thought maybe it was in the builtins but didn't see it there. Searching showed it was
if
in the Nix ref manual under Language constructs. Perhaps I missed it in the tutorial?Problem
It feels like conditionals are a basic part of the language that I'd expect to know from a first pass tutorial. In fact, the tutorial touches on all language constructs except for conditionals and asserts. Perhaps comments also.
Approaches
Add conditionals to the language basics tutorial.
Willing to help?
I'm willing to help.
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: