News for hackers. Stuff that matters.
Re:Better C – A subset of D Programming Language by pron on Tuesday April 28, 2020 @06:44AM (#23005642)
Mine is Zig.
Re:Better C – A subset of D Programming Language by logicchains on Tuesday April 28, 2020 @07:04AM (#23005772)
Are you aware of anyone with large projects in Zig? I'm curious how fast it compiles, given in my view faster compilation is one of the biggest advantages of D over C++ and Rust, due to it having a lightweight compiler, DMD. Zig seems to still use LLVM, like Rust, which is relatively slow.
Re:Better C – A subset of D Programming Language by drfuchs on Tuesday April 28, 2020 @07:25AM (#23005908)
In his live-stream three days ago, Andrew Kelley showed the beginnings of Zig directly generating debug-mode executables, very quickly. And that’s before incremental compilation and linking. This guy is amazing.

https://www.twitch.tv/videos/602715503 [edit: at 10:20]

Re:Better C – A subset of D Programming Language by logicchains on Tuesday April 28, 2020 @07:44AM (#23006031)
Ah, that's awesome! Really cool to see a new language taking compile-time so seriously.
Re:Better C – A subset of D Programming Language by setpatchaddress on Tuesday April 28, 2020 @12:58PM (#23008985)
Fast compile time isn't actually that hard for a C-like language. Good code optimization and fast compile time is hard.
Re:Better C – A subset of D Programming Language by alexhutcheson on Wednesday April 29, 2020 @05:54PM (#23024875)
Fast compile time on large projects is really hard for C and C-compatible languages due to the preprocessor and #include. Not an issue if you're comparing compilation for a single file, but it turns into a substantial fraction if your compile time when that file transitively #includes 10s or 100s of headers.
Re:Better C – A subset of D Programming Language by dgellow on Tuesday April 28, 2020 @06:56AM (#23005720)
Zig is still very experimental though, the language isn’t stable yet
Re:Better C – A subset of D Programming Language by pron on Tuesday April 28, 2020 @07:01AM (#23005754)
True, but I'm not in a hurry. We've waited a long time for a C/C++ alternative, we can wait a bit more. Some find it in D, some find it in Rust, some (like me) are waiting for Zig, and some for something else.
Re:Better C – A subset of D Programming Language by AnIdiotOnTheNet on Tuesday April 28, 2020 @09:26AM (#23006721)
Definitely. However I will say that Zig does so many things right already that I struggle to code in more mature languages without thinking "I wish I was writing Zig right now" all the time.
Re:Better C – A subset of D Programming Language by smallstepforman on Tuesday April 28, 2020 @09:10AM (#23006579)
Andrew needs to radically change his stance on Tabs for the language to be taken seriously. White space must be ignored, and Andrew should overlook his personal bias and cater to the ‘preserve white space’ crowd. Because formatting and readability matter - a lot.
Re:Better C – A subset of D Programming Language by schaefer on Tuesday April 28, 2020 @09:30AM (#23006751)
You refer to "Andrew's stance on tabs" without being specific or providing a reference, so I wend digging for more details in the language FAQ.

From the reference I found[1], Andrew's stance is: The current zig tooling forces spaces instead of tabs because the tooling for the language is not yet complete. The self hosted compiler (which the community will start using just as soon as it's ready) already does accept both tabs and spaces.

So, I'm not able to understand your complaint at all. Perhaps you could you elaborate, provide a reference, or soften your stance?

[1]: https://github.com/ziglang/zig/wiki/FAQ#why-does-zig-force-m...

Re:Better C – A subset of D Programming Language by saagarjha on Tuesday April 28, 2020 @04:24PM (#23011479)
I am very curious why the stage1 compiler cannot just run zig fmt prior to parsing the code as a stopgap until the self-hosted compiler is complete…