News for hackers. Stuff that matters.
Re:What Makes the Zig Programming Language Unique? by nurettin on Thursday October 06, 2022 @01:23AM (#33104670)
I never liked the original D in the early 2000s, especially the anti-C++ marketing rhetorics. But the post-alexandrescu D is amazing. Just last week I placed a delegate bound to a closure into an immutable struct within a child thread's run function and passed it into the main thread via send to be called and it actually worked! What an amazing language. There aren't many 3rd party libraries, though. And whatever exists is highly questionable.
Re:What Makes the Zig Programming Language Unique? by WalterBright on Thursday October 06, 2022 @03:12AM (#33105376)
Fortunately, D now has a C compiler embedded into it (ImportC). ImportC will compile C11 Standard code, and automatically make the interface to that C code available to D.

This means, if a C library is available, D can use it.

(There are some exceptions. While ImportC will handle C preprocessor metaprogramming just fine, those metaprogramming macros won't be available to the D code, other than simple #define manifest constant declarations.)

Re:What Makes the Zig Programming Language Unique? by kazinator on Thursday October 06, 2022 @02:24AM (#33105040)
> And whatever exists is highly questionable.

Could it be because some of it, say, places a delegate, bound to a closure, into an immutable struct within a child thread's run function, and passes that to another thread via a send to be called?

Re:What Makes the Zig Programming Language Unique? by nurettin on Thursday October 06, 2022 @02:55AM (#33105254)
I think so, I mean, if it is a one-off POC, nobody is going to build their uber-for-can-opener startup on top of it. But if billions of closures are actively passed around every day by thousands of projects, and lots of bug fixes and features are deployed continuously, why not build your airbnb-for-doghouses empire using that library today?
Re:What Makes the Zig Programming Language Unique? by arunc on Sunday October 09, 2022 @12:19AM (#33138238)
> What an amazing language. There aren't many 3rd party libraries, though. And whatever exists is highly questionable.

Can't agree more. Such a powerful language but with an absolute meager ecosystem! No dogfooding.

GC and crashes are pretty common on long running high performance apps. They should just build things from the ground up using betterC.