Variable and function name space
Variable and function name space
- Subject: Variable and function name space
- From: Adrian Nier <email@hidden>
- Date: Tue, 31 May 2011 09:48:01 +0200
Is it normal for a programming language to have variables and functions in the same name space?
There were some hard to catch bugs for me over the years that involved a variable and a function having the same name. To never run into this problem again I decided to put underscores before variable names. This also allows me to use names such as _class or _date which might otherwise be reserved keywords.
set doINeedToPutUnderscoresBeforeVariableNames to "Maybe"
try
return doINeedToPutUnderscoresBeforeVariableNames()
on error
return "You should start variable names with an underscore."
end try
on doINeedToPutUnderscoresBeforeVariableNames()
return "You don’t need to put underscore before variable names."
end doINeedToPutUnderscoresBeforeVariableNames _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden