A few notes on choosing between Go and D for a quick project

Nick Treleaven via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 16 10:03:47 PDT 2015


On 15/03/2015 05:06, Walter Bright wrote:
>> In D we have some implicit casts also because the "cast(int)x" syntax is
>> dangerous. But now we can write safe casts with the "int(x)" syntax,
>> so there's
>> less need of naked implicit casts.
>
> Again, too many casts can cause bugs.

You can have safe wrappers for casts. If you don't want to change the 
type, use something like std.conv.signed. Isn't that safe?


More information about the Digitalmars-d mailing list