Re:Better C – A subset of D Programming Language
by lumberjackstian on Tuesday April 28, 2020 @07:28AM
(#23005926)
Relevant post in a discussion thread that's related to the future of lazy in D: https://forum.dlang.org/post/[email protected]...
Re:Better C – A subset of D Programming Language
by WalterBright on Tuesday April 28, 2020 @07:33AM
(#23005959)
Yeah, lazy is a failure. Can't hit a homer every time. I'm not sorry we tried it. But it's time to take it behind the woodshed.
Re:Better C – A subset of D Programming Language
by lumberjackstian on Wednesday April 29, 2020 @09:48AM
(#23019109)
Why is lazy a failure and what makes it so?
And are there any languages where lazy is not a failure in your opinion?
Edit: removed link to wrong swift feature proposal.
Re:Better C – A subset of D Programming Language
by WalterBright on Tuesday April 28, 2020 @07:21AM
(#23005871)
> What's the thinking behind D's syntax?
Mainly that it be easy and quick for those familiar with C and C++ to get up to speed. With C, C++, and D, you cannot really know what will happen with the argument without looking at the corresponding parameter declaration.
Re:Better C – A subset of D Programming Language
by MaxBarraclough on Wednesday April 29, 2020 @04:09AM
(#23016678)
Got it, thanks.
Re:Better C – A subset of D Programming Language
by skocznymroczny on Tuesday April 28, 2020 @07:15AM
(#23005836)
Re:Better C – A subset of D Programming Language
by MaxBarraclough on Tuesday April 28, 2020 @07:20AM
(#23005859)
That page links to [0] which says that certain patterns become unsafe using the precise GC.
* Regarding the syntax of 'lazy'. It seems to me that it would make for better readability if the lazy keyword were required at the callsite, along the lines of doStuff(lazy getValueUsingExpensiveComputation()); rather than the current syntax where it's not clear at the callsite which, if any, of the arguments are lazy. C# does something similar with ref. What's the thinking behind D's syntax?
* What's the state, and future, of precise garbage collection in D?