On Wednesday, 9 January 2013 at 15:36:21 UTC, Tim Krimm wrote:
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.

My feeling about such feature is that it is an annotation (read: "intention"), rather than a warning (read: potential misuse) and error (read: "obvious misuse").

I would go for having annotations somewhere on the scale error/warning/annotation/correct in between the warning and correct. That is, a stand-alone language/compile feature and even flag.

Reply via email to