4 ms·
Zig also tries to block quick-and-dirty stuff, unused variables are errors for example. There are formatting related things too. This is obviously not as "righ
by generichuman 4y ago
Zig also tries to block quick-and-dirty stuff, unused variables are errors for example. There are formatting related things too.
This is obviously not as "righteous" as Rust as you put it, but when you look at the source of some shipped games, you'll see that some programming best practices are ignored.
None of this will block Zig from being used in games, of course, but I wish they had a "let me work in peace until I get this working and then we can worry about that small stuff" mode in the compiler.
- zaphar 4y agoI think the reasons languages like Zig choose not to make this configurable is because other than the odd exception occasionally very few shops bother to turn on the stricter mode or are actively hostile to the stricter mode. And when you rely on other libraries that sort of less strict mode tends to start leaking out everywhere since that one critical library you really don't want to rewrite won't compile when you use strict and you don't want to carry a bunch of patches for it either. The net result is if you don't start out enforcing cleanliness your community of users will unintentionally devolve into unclean over time.
- adamdusty 4y agoWhy not just enforce it in release configuration?
- generichuman 4y ago> The net result is if you don't start out enforcing cleanliness your community of users will unintentionally devolve into unclean over time. Well since the package manager will be integrated to the compiler, I think they could enforce the cleanliness for people who want to publish their libraries.
- naikrovek 4y ago> when you look at the source of some shipped games, you'll see that some programming best practices are ignored. yeah. players demand performance because it relates directly to a better playing experience. they demand it with their purchases and their critiques. game developers understand this inherently or they will not be a game developer for long. honestly, i think a lot of “best practices” are nothing more than an influential person demanding compliance to their preferences, because a LOT of those “best practices” actively reduce developer productivity and runtime performance both; there’s no tradeoff, its just pure loss. non-game developers could learn a lot from seasoned and experienced game developers, i think, but we imagine ourselves wholly superior when we absolutely aren’t.