[Info-vax] Variable declarations, was: Re: improving EDT
Craig A. Berry
craigberry at nospam.mac.com
Sat Nov 19 22:05:41 EST 2016
On 11/19/16 6:55 PM, Arne Vajhøj wrote:
> On 11/19/2016 3:05 PM, Simon Clubley wrote:
>> On 2016-11-18, David Froble <davef at tsoft-inc.com> wrote:
>>> I've had many criticize me for not declaring all variables. My
>>> response has
>>> been "that's the compiler's job, why should I do such work?".
>>> Nothing different
>>> in having tools that attempt to do the grunt work for you.
>>
>> They are absolutely right to criticise you IMHO. Declaring variables
>> is protection against some types of silly typing errors and in more
>> modern traditional style languages this is a requirement (or you
>> get an undeclared variable error during compilation).
And anyone who cares about their code has been requesting the greatest
level of checking the given language offers for decades, from IMPLICIT
NONE in Fortran onwards.
> True.
>
> But there are also some extremely popular languages that do not have
> such requirement including PHP and JavaScript.
>
> But I guess we can call them "non traditional".
>
> :-)
PHP is probably a lost cause, but JavaScript is moving pretty rapidly
toward a number of modern features, and derivatives such as TypeScript
offer strong typing.
More information about the Info-vax
mailing list