1. Re: Little qestion...
- Posted by "Everett L.(Rett) Williams" <rett at GVTC.COM> Sep 26, 1999
- 308 views
--------------F09D3BAD51C197BF734CE555 Bernie, I am a new person on this mail list, but have written to Robert in the past on this very subject. The important point about "variable" and "constant" is that in Euphoria, a constant is a very special animal. It is forced to global scope by definition, and by the requirement that it be found in the main line of the program. I can only assume, that constants are only handled once by the interpreter, put into a special non-dynamic area at the beginning of the name table and never revisited except for reference. I also, suspect that in the interpretation process, they are substituted either on a parse pass or with the "literals" in a statement. Speaking of that, I believe that "literal" may be a term that all of you have been searching for. All atoms that are not written as variables are literals by usage in many other languages. The logical treatment of all atoms as numbers in Euphoria gets rid of a confusion found in most languages at the expense of introducing a confusion in the minds of most people not working as programmers. The treatment of constants is exactly like that of literals within the language. It is merely a bow to the symbolic way in which humans process information. That is why it "logically" belongs in a parsing pass of a statement rather than in dynamic variable resolution. Everett L.(Rett) Williams rett at gvtc.com > Subject: Re: little question once again > Date: Sat, 25 Sep 1999 23:24:09 -0400 > From: Bernie Ryan <bwryan at PCOM.NET> > > On Sun, 26 Sep 1999 02:18:04 GMT, Lionel Wong <eljay98 at HOTMAIL.COM> > wrote: > > >> constants and variables are called VARIABLES > > > >Unfortunately, Bernie, if a constant is a variable then it's not > constant > >anymore. And if a variable is a constant then it's not variable > anymore. > > > >I tried to think so before, but it's a paradox, cancelling itself in > truth. > >Computer terms are paradoxical puns. =) > > > >Thx anyway, > >Lionel. > > > >______________________________________________________ > >Get Your Private, Free Email at http://www.hotmail.com > > Linonel > You still do not understand what I mean. > A variable is the name of the location for storing data in memory. > You can define a variable to contain a constant value. > You can define a variable to contain a changing value. > Both are called variables. > Bernie > --------------F09D3BAD51C197BF734CE555 <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <body bgcolor="#FFFFFF"> Bernie, <br>I am a new person on this mail list, but have written to Robert in the past on this very subject. The important point about "variable" and "constant" is that in Euphoria, a constant is a very special animal. It is forced to global scope by definition, and by the requirement that it be found in the main line of the program. I can only assume, that constants are only handled once by the interpreter, put into a special non-dynamic area at the beginning of the name table and never revisited except for reference. I also, suspect that in the interpretation process, they are substituted either on a parse pass or with the "literals" in a statement. Speaking of that, I believe that "literal" may be a term that all of you have been searching for. All atoms that are not written as variables are literals by usage in many other languages. The logical treatment of all atoms as numbers in Euphoria gets rid of a confusion found in most languages at the expense of introducing a confusion in the minds of most people not working as programmers. The treatment of constants is exactly like that of literals within the language. It is merely a bow to the symbolic way in which humans process information. That is why it "logically" belongs in a parsing pass of a statement rather than in dynamic variable resolution. <p>Everett L.(Rett) Williams <br>rett at gvtc.com <br> <br> <br> <blockquote TYPE=CITE><nobr><b>Subject: </b>Re: little question once again</nobr> <br><nobr><b>Date: </b>Sat, 25 Sep 1999 23:24:09 -0400</nobr> <br><nobr><b>From: </b>Bernie Ryan <bwryan at PCOM.NET></nobr> <pre WRAP>On Sun, 26 Sep 1999 02:18:04 GMT, Lionel Wong <eljay98 at HOTMAIL.COM> wrote: >> constants and variables are called VARIABLES > >Unfortunately, Bernie, if a constant is a variable then it's not constant >anymore. And if a variable is a constant then it's not variable anymore. > >I tried to think so before, but it's a paradox, cancelling itself in truth. >Computer terms are paradoxical puns. =) > >Thx anyway, >Lionel. > >______________________________________________________ >Get Your Private, Free Email at <a >href="http://www.hotmail.com">http://www.hotmail.com </a>Linonel You still do not understand what I mean. A variable is the name of the location for storing data in memory. You can define a variable to contain a constant value. You can define a variable to contain a changing value. Both are called variables. Bernie</pre> </blockquote> </html> --------------F09D3BAD51C197BF734CE555--