Wed Oct 17 - Avoiding Code Smells by Walter Bright

unprotected-entity unprotected-entity at gmail.com
Mon Nov 5 05:54:36 UTC 2018


On Saturday, 3 November 2018 at 21:35:04 UTC, Walter Bright wrote:
> On 11/2/2018 5:44 PM, Laeeth Isharc wrote:
>> When one encounters a new idea that's unfamiliar sometimes 
>> it's easy to think that because it's unfamiliar it must be 
>> unsound. That can be a mistake.  It might be better to suspend 
>> judgement for a while and keep an open mind.
>
> So true. My ideas on how to write code have changed 
> dramatically over the years, and continue to change.

what are your thoughts on implicit conversions, given your 
obvious experience?

To me, implicit conversion are code smells, as they undermine the 
independence of types (and as you've probably gathered, I very 
much like type independence..a lot).

Did you do it this way for C like compatability?

Would you do it differently, if you could?

uint x = -10; // what!

int x;
bool y = true;
x = y; // what!

etc..



More information about the Digitalmars-d-announce mailing list