Re: Non-declared Variables

gnorik@gmail.com
24 Oct 2006 17:34:39 -0400

          From comp.compilers

Related articles
Non-declared Variables acampbellb@hotmail.com (Avatar) (2006-10-16)
Re: Non-declared Variables int2k@gmx.net (Wolfram Fenske) (2006-10-17)
Re: Non-declared Variables gnorik@gmail.com (2006-10-24)
RE: Non-declared Variables qtj-query@shaw.ca (Quinn Tyler Jackson) (2006-10-26)
Re: Non-declared Variables Peter_Flass@Yahoo.com (Peter Flass) (2006-10-26)
Re: Non-declared Variables pjb@informatimago.com (Pascal Bourguignon) (2006-10-28)
Re: Non-declared Variables ArarghMail610@Arargh.com (2006-10-28)
Re: Non-declared Variables genew@ocis.net (Gene Wirchenko) (2007-01-28)
| List of all articles for this month |

From: gnorik@gmail.com
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...


Regards


Norayr Chilingaryan


---
http://geocities.com/n0rayr




"Avatar
"
> 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.