but I cant say the same to Zig because I dont see it as (big) update compared to what we have
but I cant say the same to Zig because I dont see it as (big) update compared to what we have
Still wherever I need absolute code correctness and production grade quality, I use Rust, my favourite language, at the expense of more code and spending more time doing it "the right way".
I was reading an article about rust posted here yesterday and i realized: i have no clue what is going on in this code (also i presume "templage" is a typo):
#[derive(Debug, Default)]
pub struct Context {
authed: bool,
}
#[derive(Template)]
#[templage = "layout.jinja"]
struct HomeTemplate {
ctx: Context
};
pub async fn home() -> impl
IntoResponse {
HtmlTemplate(
HomeTemplate { ctx:
Context::default() }
).into_response()
}I love Rust and do some advanced code sometimes, but very rarely have I created a macro. I still see it more or less like "magic" that "super-human" library developers master to make their life easier. Typically not my use case.
This is another advantage of Zig. As you may know, metaprogramming in Zig doesn't use any special syntax, but rather the Zig language itself. This is often known as comptime and while not necessarily easy to grasp, as you're reasoning about compile time stuff, at least it's done in pure Zig.
Stuff like
> Also the learning curve for Zig can be steep, especially for those unfamiliar with low-level programming concepts.
I don't think an LLM would start a sentence with "also" like that
> The small and simple syntax is an important part of the maintenance, as it is a goal of the language to allow maintainers to debug the code without having to learn the intricacies of a language they might not be familiar with.
The wording here feels like someone who's a fan of Zig taking a sentence praising Zig's design and trying to rework it into a slightly more neutral encyclopedia style.
This sounds exactly how llms have made comparisons for me. What reviewers?
IMO, there are things Zig just don’t care about, which in the surface makes it simple but its annoying and burdensome later on.
* Manual interface implementation
* Internals of a struct is public
* No string types
* anytype requires reading code
* Error can’t carry information
* The iteration abstraction in the std is all over the place
* Unused declarations is compilation error