Name of variables: an issue
#9
(09-09-2022, 04:19 PM)atmnrvovrfc Wrote:
(09-09-2022, 01:25 PM)TDarcos Wrote: OPTION _UNIQUE
Nope, because some people right now depend on "a$" being different from "a AS UDT" or something like that. The QB64 source code might feature it.
Excuse me, and I am trying to understand something. You are saying it's not a good idea because people may be depending on use of the same variable name in different data types, e.g. using both a% and A$, Yes, I can understand, we can't add a feature that breaks compatibility with existing programs; I get it, and it makes sense, What I am trying to understand is how does a new feature not used in a program affect  that program? If you knew about it but didn't use it or didn't know about it, the exact same behavior happens: nothing. Remember, I suggested it as an optional feature, that someone who wants this feature as a means to protect from collision errors (using the same variable for different purposes, or thinking one variable is the same as a different one because the base name is the same). Most languages do not allow reuse of a named variable for a different purpose in the same scope.

It's not that I thought it was all that important, just a way for someone who wants to use it, and by making it optional, those who want the extra protection could use it.
While 1
   Fix Bugs
   report all bugs fixed
   receive bug report
end while
Reply


Messages In This Thread
Name of variables: an issue - by TempodiBasic - 08-30-2022, 06:12 AM
RE: Name of variables: an issue - by SMcNeill - 08-30-2022, 06:18 AM
RE: Name of variables: an issue - by TempodiBasic - 08-30-2022, 03:01 PM
RE: Name of variables: an issue - by SMcNeill - 08-30-2022, 03:32 PM
RE: Name of variables: an issue - by TempodiBasic - 08-31-2022, 11:47 PM
RE: Name of variables: an issue - by TDarcos - 09-09-2022, 01:25 PM
RE: Name of variables: an issue - by mnrvovrfc - 09-09-2022, 04:19 PM
RE: Name of variables: an issue - by mnrvovrfc - 09-09-2022, 04:33 PM
RE: Name of variables: an issue - by TDarcos - 09-26-2022, 12:52 AM
RE: Name of variables: an issue - by mnrvovrfc - 09-26-2022, 05:13 AM
RE: Name of variables: an issue - by Pete - 09-26-2022, 08:18 PM
RE: Name of variables: an issue - by Petr - 10-01-2022, 07:21 PM



Users browsing this thread: 13 Guest(s)