Yes it is understandable, it takes time to show applicability and functionality.Such languages come up every so often, get popular on pop sites as the next great thing, then fade away.
myVar :: int;
I'm not knowledgeable enough to judge, but it seems to me that the similarity of javascript syntax in the example code at ZIG is to a much lesser degree than at the RUST lang that is slowly entering OS development.I see a syntax resemblance of javascript in example code. I assume that zig is not native/compiled language and that is a big no no is OS development mostly.
it takes time to show applicability and functionality.
then fade away.
A very well argued explanation!Where the variable type goes is not important these days. In the old days, you had single pass compilers which fit in some KB of memory. There it makes sense to not save the type from the beginning of the statement and apply it to all names seen later. You added the names to the list and applied the type later, saving the memory space for the type to keep around the maybe recursive parsing. It makes sense. These days, the language designers think anything goes, and that leads to syntax like javascript or the rest.
ZIG may have it's use, but the benefit for using it seems too small to be an argument for transition of ther code bases to it. The dimishing return does not pay enough here. Development of the system will continue in C where needed, C++ where possible and that will be it.
Dear ProphetOfDoom, don't worry at all. I did not experience your message so dramatically at all, on the contrary ...@lsoux I just wanted to add, I wasn't trying to denigrate your hobby OS by disparaging Zig. I know that a solo OS takes an immense amount of work, even more than a compiler, and I'm sorry if it came across that I was detracting from that.
I have an issue with "programmer pride" and I feel this is particularly bad amongst the inventors of languages, and for no good reason...
I do not underestimate at all, and how difficult it is to start even a hobby OS with the main goal of learning something, I feel the most painfully on my own skin...I think you're underestimating how difficult is it to write an operating system; let alone a stable, performant one. Then there's drivers..
Well, you kind of have to with a pure Rust OS, don't you?With pure Rust OSes like Redox, the developers seem like fans of the language and willing to go all in
As long as such problems are not resolved Rust is a no-go for base-FreeBSD:One issue with rust, ...
I agree. Whilst some replacements are nice languages in their own right, you lose many of the benefits from directly using C.Unfortunately we have also too many (stupid) upgrades of C and especially C++.
The interop isn't quite like C++ where you can drop the file in your project and it is ready to go. However, it is a bit easier than others. You import and then all the functions from that import are available, in other languages this would be a lot more ceremony. In this case the docs aren't too descriptive, but tutorials illustrate it pretty well. Here is an example:I agree. Whilst some replacements are nice languages in their own right, you lose many of the benefits from directly using C.
C++ and Obj-C at least are on the right track in that they are "C with more stuff". However different languages entirely such as Rust and Go with requirements for FFI/binding generators is not going to work in the long run in my opinion. People are going to lose many hours here.
I keep hearing that Zig has direct interop with C but it doesn't look like that is true? If I am missing something and it *does*, then at least that does bring Zig in line with the C++, Obj-C approach of building upon C which I do tend to agree with. Cgo was close with the comment preamble stuff, but not quite.