"I have to carefully make sure that each resource has been freed/closed (but not too soon!)"
You can use defer keyword to free right after allocating and it won't be called until the function/program completes. You can use debug or testing allocators to ensure no memory is left unfree'd or double free'd. The std lib has a large selection of custom allocators that you can use depending on your needs. One great one is an "Arena Allocator" which is just a linked-list of allocations that can be free'd at one time, versus tracking all these individual allocations. And if none of these allocators fit your needs, the interface to define one is pretty easy to implement.
https://ziglang.org/documentation/0.7.1/#Choosing-an-Allocat...
"I'm not mutating or holding onto anything I'm not meant to"
Not really sure Zig can help you with this one. With great power comes great responsibility, or something like that.
"that I've accounted for every exception that I can result from a given call"
Zig does not have exceptions, but it does have error types which functions can return. From the function definition you usually can determine all the errors that can possibly be returned, unless the function definer use'd the catch all ! error type. Regardless, it is still much better than regular exceptions because
- you know by the function def that an error could be thrown, the compiler forces the caller to account for a possible error by "unwrapping" the return value
Check out the Zig standard library and the tests for examples on doing some basic stuff with the language. Tests are generally at the end of files, you can search for "test".
Yeah that's true but I disagree it's a good idea. Most AAA shops still use non-GC languages because they need the full control/cannot waste ms on random GC pass.
I can't fully understand why I find this so funny but I am just falling out of my seat laughing.
While I find this extremely comical, I am excited to see the consequences of this for desktop linux. The way I see it, the more people who use linux the better it will become :).
I had the same problem with my blu-ray player. I had to go online and add it to my instant queue. Then I was able to access it on blu-ray player through my queue. I don't know why it doesn't show up on other interfaces besides web. Anyone else having this problem with other interfaces besides blu-ray and apple tv?
I really enjoyed the first 2 episodes. I wasn't sold after the first episode but after the 2nd I became a fan. The character development and pacing is great. It has this sense of foreboding and everything is always moving quickly. Since they expect you to binge watch there are no catch ups. If you're a fan of breaking bad you'll love house of cards.
If the search results just went to the side I think I would have enjoyed it more. Still fun but with constant break in the action it becomes annoying :/