Naming things

John Chapman via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 22 10:46:43 PDT 2015


On Monday, 22 June 2015 at 11:45:31 UTC, Wyatt wrote:
>  None of the suggestions I've seen so far really call out to me 
> "hey, this is lazy and has a non-lazy counterpart".  Would it 
> be so wrong to add "lazy" to the beginning or end so it's super 
> obvious at a glance with zero cognitive overhead?
>
> -Wyatt

This would be my preferred option. When C# introduced 
asynchronous counterparts of existing methods, they appended 
"Async" to the names, which seems to have worked out well - eg, 
Wait/WaitAsync, Read/ReadAsync. So we'd have 
setExtension/setExtensionLazy etc.


More information about the Digitalmars-d mailing list