4 ms·
Hi Walter. I have two and a half questions: * Regarding the syntax of 'lazy'. It seems to me that it would make for better readability if the lazy keyword were
by MaxBarraclough 7y ago
Hi Walter. I have two and a half questions:
* 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?
- skocznymroczny 7y agohttps://dlang.org/changelog/2.085.0.html#gc_precise https://dlang.org/changelog/2.085.0.html#gc_precise
- MaxBarraclough 7y agoThat page links to [0] which says that certain patterns become unsafe using the precise GC. [0] https://dlang.org/spec/garbage.html#precise_gc https://dlang.org/spec/garbage.html#precise_gc
- WalterBright 7y ago> 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.
- MaxBarraclough 7y agoGot it, thanks.
- lumberjackstian 7y agoRelevant post in a discussion thread that's related to the future of lazy in D: https://forum.dlang.org/post/ngkvntcrfdbsnxzfmcky@forum.dlang.org https://forum.dlang.org/post/ngkvntcrfdbsnxzfmcky@forum.dlan...
- WalterBright 7y agoYeah, 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.
- lumberjackstian 7y agoWhy 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.