News for hackers. Stuff that matters.
Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by camdenlock on Sunday October 14, 2018 @04:56PM (#18215278)
I have nothing against Zig, but... am I the only one feeling "new programming language fatigue" lately? Seems like there are several new ones per week these days.
Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by pjmlp on Sunday October 14, 2018 @06:01PM (#18215714)
As language geek I love playing around with new languages.

For production code I have learned to choose programming languages that are first class citzen in the platform or libraries that are required for a given project.

While it might seem boring or outdated, it is much more productive and future proof than picking the language and then sort out how to integrate them.

Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by codr4 on Sunday October 14, 2018 @05:10PM (#18215356)
One of my teachers at university kept repeating that you can't really call yourself a programmer before you've implemented at least one language. I don't know about that, everyone is entitled to an opinion.

What I do know is that it's one of precious few things in software that I still find interesting enough to bother [0]. I'm guessing part of the answer is that this is where you end up sooner or later.

And then we have the internet, which is a big part of the equation. It's easy to get numb, but I remember a time when information about implementing interpreters/compilers was VERY hard to come by.

It's all good from my perspective, we're barely scratching the surface of what is possible and there are plenty of good ideas left to rediscover in our history.

But I do wish that more designers would dare to step outside of the box more. Creating a language isn't about cherry picking features from existing languages, it's about finding better ways of solving problems.

[0] https://github.com/codr4life/snabl

Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by edflsafoiewq on Sunday October 14, 2018 @07:48PM (#18216325)
What I like about Zig is that its comptime facility makes the compiler a mixed evaluator in Andrei Ershov's sense: the compiler works by, for comptime structures, evaluating them, and for non-comptime structures, emitting a residual program that will evaluate them at run-time. It offers an accessible form of partial evaluation.
Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by smt88 on Sunday October 14, 2018 @05:02PM (#18215312)
I get what you mean, but Zig is a little different because it's not a naive, vanity project. All of its motivations are practical and related to the usability of the language.
Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by Caster9 on Sunday October 14, 2018 @05:06PM (#18215339)
It's getting easier to build them.
Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by richardwhiuk on Sunday October 14, 2018 @05:53PM (#18215658)
It's not - it's getting harder to build worthwhile ones.

The barrier to entry is higher, the expectations on the size of the standard library are higher, the expected quality of tools is higher.

Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by blt on Sunday October 14, 2018 @06:45PM (#18215986)
Everything in your second sentence is true, but it seems like LLVM has been a huge boost. I think a lot more programmers are comfortable with parsing and ASTs than they are with the x86 instruction set. Not having to write IL->CPU codegen or peephole optimizations significantly lowers barrier for entry to compiled PL development.

(I say this as just an observer, having written interpreters but no compiled languages.)

Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by andrewflnr on Sunday October 14, 2018 @06:19PM (#18215837)
But it's getting easier to just implement a language at all. That might be all you need to hit HN. No one said anything about "worthwhile" ones.
Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by mmirate on Sunday October 14, 2018 @11:24PM (#18217201)
That says a lot more about HN than about anything else...
Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by andrewflnr on Sunday October 14, 2018 @11:42PM (#18217262)
It says that we look for more in an idea than pure utility, that cleverness and beauty also count. That's a good thing.
Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by mmirate on Monday October 15, 2018 @07:28PM (#18225019)
> That's a good thing.

Maybe, maybe not, but luckily that question's not very important. Here's what is:

Where is the cleverness and beauty in Yet Another Boring LLVM Frontend(tm)? Zig and Rust are more than that, I'll readily grant - but that description does fall under the umbrella of "implementing a language".

Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by isaachier on Sunday October 14, 2018 @05:03PM (#18215320)
I usually agree, but at least Zig has something new to bring to the table (allocation safety).
Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by pjmlp on Sunday October 14, 2018 @06:10PM (#18215773)
Programming languages has been one of my major subjects at the university and I don't see anything new in Zig regarding memory allocation.
Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by AndyKelley on Sunday October 14, 2018 @06:45PM (#18215989)
The only thing that's new is the convention to actually handle out of memory correctly, and the convention to accept an allocator as a parameter rather than using a global allocator.
Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by pjmlp on Monday October 15, 2018 @02:56AM (#18217888)
Yep, nothing new unless one only knows C.
Re:Why Zig When There Is Already CPP, D, and Rust? (2017) by dixego on Sunday October 14, 2018 @08:16PM (#18216436)
I love seeing new programming languages. Obviously one expects most of them will never get anywhere but it's interesting to see the ways in which people want to be able to make programs but are unable to in existing programming languages, expressed in the form of a language they'd want to use.