It may be useful to allow declaring variables without type

Atila Neves via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 10 10:32:17 PDT 2015


On Wednesday, 10 June 2015 at 17:04:20 UTC, Binarydepth wrote:
> I think that it could be useful to declare variables as Python 
> does and statically too in the same language. Just make it's 
> type when a value is assigned to the variable. This could allow 
> a program to adjust it's data types accordingly to input when 
> data is received from another program or an user.
>
> BD

I disagree on the usefulness. I think this is one of the few 
things Perl got right; the problem with automatically creating 
variables is that you might create one when you're not expecting 
to because of a typo.

Atila


More information about the Digitalmars-d mailing list