Re: Non-declared Variables
24 Oct 2006 17:34:39 -0400

          From comp.compilers

Related articles
Non-declared Variables (Avatar) (2006-10-16)
Re: Non-declared Variables (Wolfram Fenske) (2006-10-17)
Re: Non-declared Variables (2006-10-24)
RE: Non-declared Variables (Quinn Tyler Jackson) (2006-10-26)
Re: Non-declared Variables (Peter Flass) (2006-10-26)
Re: Non-declared Variables (Pascal Bourguignon) (2006-10-28)
Re: Non-declared Variables (2006-10-28)
Re: Non-declared Variables (Gene Wirchenko) (2007-01-28)
| List of all articles for this month |

Newsgroups: comp.compilers
Date: 24 Oct 2006 17:34:39 -0400
Organization: Compilers Central
References: 06-10-064
Keywords: design
Posted-Date: 24 Oct 2006 17:34:39 EDT

I don't think that it is a good idea when language definition allows
you to use variables without declaration.
First of all, it leads to bugs which is rather hard to find.
You may do a type, and write, let's say instead of myvar, mywar, and
thus mywar most likely don't equal to myvar (probably it will be
initialized as zero) you already have a bug.
Secondly, when people used to declare variables they know what they are
doing. They know that if they need a one byte variable, or two, or four
byte variable, then they don't have to allocate space for a whole
string, as done in most of scripting languages starting from basic, and
still in perl, tcl, etc...


Norayr Chilingaryan


> I would like to hear people's opinions on the ability to use variables
> without declaring them in dynamic languages like Ruby.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.