Zig is the only new languages that I can see myself use professionally in the future. System programming is famously hard to learn, so I'm so glad to see you make content around the topic !
Zig is a very promising systems programming language. It is low level and if you haven't dealt with manual memory allocation and custom allocators then all of this might seem like black magic, because higher level languages do a lot of things for you and you don't have to worry about it when you write code. To understand the purpose of zig you have to remember that it is supposed to be like C (simple syntax, transparent, almost no hidden things or syntactic sugar), but at the same time it aims to have better defaults than C. For example: in c every pointer has the same type definition and you cannot distinguish a pointer to a single element from a pointer to an array of elements. Also, the size of an array is decoupled from the array pointer so you have to pass the size separately to a function. In zig, there are pointer types dedicated to passing exactly one element or an array of elements (slice or a fat pointer), there is also a "pointer to many" which doesn't contain the array size and it is meant to be used when interfacing a library written in C. You can also do pointer arithmetic with "pointers to many", something which is disabled for regular pointers as it doesn't make sense to offset a pointer which points to exactly one element. Zig pointers are non-nullable by default (* type), meaning that the compiler can ensure that a value exists, and if you use the nullable pointer (?* type) then you have to check if the value exists before using it. This prevents a lot of null pointer bugs. Nullable pointers don't take any additional memory, they simply allow the null value (probably 0 on most CPU architectures) to be assigned to them. Zig also has a lot of neat features like if expressions (if (condition) value1 else value2), switch statements/expressions with pattern matching, compile time reflection and comptime metaprogramming which doesn't require the use of macros or generics/templates.
More Zig videos please. Great content! Liked and subbed!
Starts around 46:35 maybe; I dunno, I'm bailing on this
I've been watching prison break lately, and she looks like the woman who acted Sarah tancretty
Thanks for this, Bashbunni, I've been messing around with Go and Rust. Looks like I will settle with Go. Anyway, please do more of these programming streams.
People forget that Mac OS X is forked from the FreeBSD base from way back when. So the Darwin kernel in Mac OS X and the iPhone is FreeBSD based.
Always enjoy your videos, and one question related to Neovim: will TJ and yourself appear on bsky anytime soon?
If you like Go you will definitely enjoy Odin a lot more than Zig.
Are you doing advent of code ?
how to not have errors in zig? cross compile C# too. punches self in face
Pre-watching thought: I am about to get absolutely destroyed by Rust soon so this is intriguing to me.
Who is Zig and why you want to learn about him?
Are those Maasai lesos?
There is literally nothing you should never speak with others.
So it is fun to learn zig? Why?
1:33:10 When I went to Canada Zouk Congress (in Toronto) last May I was pleasantly shocked at how further my Joe Biden American $$$ went. Granted it was my first international trip in years. Temporarily leaving Murica more often is definitely the move in 2024 now that I got that passport again.
damn, very good eyes
And people say that Java is a hard language to learn. LMAO.
@tissuepaper9962