small idea

Tim Krimm twkrimm at gmail.com
Wed Jan 9 07:36:20 PST 2013


On Wednesday, 9 January 2013 at 15:10:47 UTC, bearophile wrote:
> eles:
>

>
> make_a_equal_to_b(ref a, in b)
>
> This feature was discussed several times in past for D. The 
> advantage is more readability for the code and less surprises. 
> The disadvantages are more typing, some code breakage of D2 
> code (because even if at the beginning it's a warning, and 
> later a deprecation, you will eventually need to enforce it 
> with an error).
>

Why make it a requirement or give a warning.
Just allow the programmer to do it in version 2.x or 3.x.
If it catches on, then start with a warning in version 4.x or 
whatever.

Note: I would not add this feature if it creates a lot of work 
for the compiler writers.


More information about the Digitalmars-d mailing list