Zen-C: Write like a high-level language, run like C
121–130 of 159 posts
Re: Zen-C: Write like a high-level language, run like C
#122Re: Zen-C: Write like a high-level language, run like C
#123Re: Zen-C: Write like a high-level language, run like C
#124Re: Zen-C: Write like a high-level language, run like C
#125So, the point of this language is to be able to write code with high productivity, but with the benefit of compiling it to a low level language? Overall it seems like the language repeats what ZIG does, including the C ABI support, manual memory management with additional ergonomics, comptime feature. The biggest difference that comes to mind quickly is that the creator of Zen-C states that it can allow for the produ…
I wonder, how can a programming language have the productivity of a high-level language ("write like a high-level language"), if it has manual memory management? This just doesn't add up in my view. I'm writing my own programming language that tries "Write like a high-level language, run like C.", but it does not have manual memory management. It has reference counting with lightweight borrowing for performance sensi…
Re: Zen-C: Write like a high-level language, run like C
#126So, the point of this language is to be able to write code with high productivity, but with the benefit of compiling it to a low level language? Overall it seems like the language repeats what ZIG does, including the C ABI support, manual memory management with additional ergonomics, comptime feature. The biggest difference that comes to mind quickly is that the creator of Zen-C states that it can allow for the produ…
There are going to be lots of languages competing with Rust and Zig. It's a popular, underserved market. They'll all have their unique angle.
In that sense Zen-C changed too many things at once for no good reason. If it was just C with defer, there would have been an opportunity to include defer in the next release of the C standard.
Re: Zen-C: Write like a high-level language, run like C
#127Earlier quoted context omitted.
It might or might not be a toy project, I'm not sure, but one advantage of subtracting the borrow checking is that the compiler avoids a lot of complex machinery. Borrow checking in Rust isn't sound AFAIK, even after all these years, so some of the problems with designing and implementing lifetimes, region checking, and borrow checking algorithms, aren't trivial.
> Borrow checking in Rust isn't sound AFAIK, even after all these years Huh? If borrow checking in Rust is unsound, that's akin to saying Rust is utterly broken. Sounds like you've been fed FUD. If Rust was that unsound, Rust haters would flood Twitter with Rust L takes.
Re: Zen-C: Write like a high-level language, run like C
#128Earlier quoted context omitted.
"immutable variable" is an oxymoron. Just because Javascript did it does not mean every new language has to do it the same way.
I think you are confused by terminology here and not by behavior, "immutable variable" is a normal terminology in all languages and could be says to be distinct from constants. In Rust if you define with "let x = 1;" it's an immutable variable, and same with Kotlin "val x = 1;"
Neither "let" nor "val[ue]" implies constancy or vacillation in themselves without further context.
Re: Zen-C: Write like a high-level language, run like C
#129Earlier quoted context omitted.
"immutable variable" is an oxymoron. Just because Javascript did it does not mean every new language has to do it the same way.
“Immutable” and “variable” generally refers to two different aspects of a variable’s lifetime, and they’re compatible with each other. In a function f(x), x is a variable because each time f is invoked, a different value can be provided for x. But that variable can be immutable within the body of the function. That’s what’s usually being referred to by “immutable variable”. This terminology is used across many differ…
Good luck propagating ideas, as sound as it might, to a general audience once something is established in some jargon.
[1] https://en.wiktionary.org/wiki/mneme [2] https://www.merriam-webster.com/medical/mnemon
Re: Zen-C: Write like a high-level language, run like C
#130Earlier quoted context omitted.
C is literally a high level language.
Seriously, in the discussion happening in this thread C is clearly not a high-level language in context. I get your statement and even agree with it in certain contexts. But in a discussion where high-level languages are presumed (in context) to not have memory management, looping constructs are defined over a semantics inferred range of some given types, overloading of functions (maybe even operators), algebraic dat…
C was coined originally as high level because the alternatives were things like assembler. a term rooted in comparisson more than anything.