On 11/5/2011 6:48 PM, Andrei Alexandrescu wrote:
Most everyone agrees that sometimes specifying a type, even if
redundant, is helpful. There are people who think those cases form all
or a majority of all instances (and hence auto should be avoided), but I
have reasons to believe they're a minority.

Andrei

I tend to agree with Andrei here. I'm a bit biased, though, because before I started using D most of my experience was in dynamic, duck-typed languages. To me, the nominal type of something doesn't really mean much. Occasionally it's useful to see a type explicitly specified when there's a specific reason why it needs to be emphasized for clarity. On the other hand, languages like Python, Ruby, PHP and Perl argue very strongly that we could move even further away from explicit type declarations and still have a usable language.

Reply via email to