What's the purpose of the 'in' keyword ?

eastanon biorelated at gmail.com
Mon May 28 10:58:30 UTC 2018


On Sunday, 27 May 2018 at 16:00:15 UTC, Jonathan M Davis wrote:
> On Sunday, May 27, 2018 16:28:56 Russel Winder via 
> Digitalmars-d-learn wrote:
>> [...]
>
> Honestly, I'd suggest that folks never use in at this point. 
> There's zero benefit to it. In principle, in was supposed to be 
> const scope, but scope has never really done anything for 
> anything other than delegates, so there has been no reason to 
> use it over const. However, many folks seem to like it based on 
> the idea that it was the opposite of out - and some folks used 
> it based  n what they expected scope to end up meaning whenever 
> it finally got implemented for more than just delegates. Either 
> way, it didn't actually buy them anything as long as scope has 
> done nothing.
>
> [...]

I really find these type of descriptions to be really useful and 
insightful. Going through the D textbooks can leave someone a 
little confused on when to use what and where? D has so many 
keywords and as a beginner it can be overwhelming.  Thank you for 
your insights.


More information about the Digitalmars-d-learn mailing list