News for hackers. Stuff that matters.
Re:Building an efficient and portable programming language w... by skohan on Thursday May 13, 2021 @11:16AM (#27143046)
I don't know much about Kelley, but if the goal is to create a "C replacement", aggressively keeping the language surface area small seems like a reasonable way to go.
Re:Building an efficient and portable programming language w... by blacktriangle on Thursday May 13, 2021 @02:29PM (#27145533)
And even if you don't think that's right, we already have the large-surface area systems programing language experiment in Rust. Aren't we better off with Rust and Zig exploring clearly different paths for a C replacement than both of them trying the same things?
Re:Building an efficient and portable programming language w... by drcode on Thursday May 13, 2021 @11:19AM (#27143082)
Exactly, this is why he sometimes comes off as a jerk, because he tells people stuff like "No, you can't add your virtual function table feature to Zig, OOP programming is a bad idea in a systems language."
Re:Building an efficient and portable programming language w... by matheusmoreira on Thursday May 13, 2021 @11:24AM (#27143147)
Indeed. In this video he explains the reason why he made those choices:

https://youtu.be/Gv2I7qTux7g?t=120

All these programming language features require a lot of machinery, complicating the binary interfaces of the resulting software and preventing code reuse.

Re:Building an efficient and portable programming language w... by v8dev123 on Thursday May 13, 2021 @11:53AM (#27143522)
Simple, small languages getting complicated when used in large applications while complex languages become simple and easier when used in large applications.
Re:Building an efficient and portable programming language w... by skohan on Thursday May 13, 2021 @12:36PM (#27144198)
That mostly seems correct, but Zig will be an interesting one to watch due to the approach of having powerful compiletime execution. I.e. Zig doesn't have generics in the traditional sense, but you can get them by writing normal code which creates types for you at compiletime. The promise would be that you can get more advanced features without adding complexity to the language, i.e. like in Rust where you have to basically understand the AST in depth to be able to write macros. We'll see if it pans out.

Also for instance Go has been able to stay relevant while staying very small. Complex languages can help with complex projects if there is a good program structure, but one advantage of simple languages is there is only so much of a mess which can be made if developers go a bit off the reservation.

Re:Building an efficient and portable programming language w... by dnautics on Thursday May 13, 2021 @02:11PM (#27145323)
Yeah this is not my experience. Enterprise distributed systems are much easier in erlang and elixir, which are simple languages, over java, which is not.
Re:Building an efficient and portable programming language w... by v8dev123 on Thursday May 13, 2021 @02:19PM (#27145417)
They are functional languages. There is difference.