Eloquently sums up my feelings about the disadvantages of dynamic typing

Jonathan M Davis jmdavisProg at gmx.com
Wed Oct 16 20:39:36 PDT 2013


On Thursday, October 17, 2013 05:12:48 Adam D. Ruppe wrote:
> On Thursday, 17 October 2013 at 03:07:30 UTC, Jonathan M Davis
> 
> wrote:
> > I pretty much outright hate dynamic typing and expect that I
> > will never heavily use a language that has it.
> 
> Be careful what you say: D has dynamic typing! (see: std.variant,
> or my arsd.jsvar)
> 
> The important thing though is that D doesn't *force* you to use
> it: it is there for the cases where you want it, and not when you
> don't want it.

It's not quite the same thing. D itself is not dynamically typed. It just 
allows you to create it with your own types if you want to. But I also think 
that variants should be avoided unless they're absolutely necessary, and it's 
very rare that they're necessary. Certain specific stuff needs it (like the 
result from a database query), but the vast majority of code does not.

- Jonathan M Davis


More information about the Digitalmars-d mailing list