dot notation
Scott Raney
raney at metacard.com
Thu May 22 19:56:00 EDT 2003
On Thu, 22 May 2003 Richard Gaskin <ambassador at fourthworld.com> wrote:
>
> It seems acceptable to the interpreter to use dot notation for labelling
> handlers and properties, e.g.:
>
> on my.mouseUp
> doSpecialStuff
> end my.moyseUp
>
> set the uMyStuff.data[4] of this stack to tMyVar
>
> It seems in some cases the visual break of the period may be useful for
> readability.
>
> Can you think of any reason using dot notation like this would not be a good
> idea?
Because we may add some meaning to the "." character to the language
at some point. The parser is IMHO really far too lenient about
allowing stuff like this at present: most punctuation is accepted in
an identifier yet most of it is also likely to be given special
meaning to the language at some point. This was done primarily to
maximize HyperCard/SuperCard compatibility, but just because the
engine currently allows something doesn't make it a good idea to do
it.
I'd recommend using only letters, numbers, and underscores in
variable, property, and handler names. Use anything else and you're
just asking for backward-compatibility trouble when a new version of
the language comes out.
Regards,
Scott
> --
> Richard Gaskin
> Fourth World Media Corporation
> Developer of WebMerge 2.2: Publish any database on any site
> ___________________________________________________________
> Ambassador at FourthWorld.com http://www.FourthWorld.com
> Tel: 323-225-3717 AIM: FourthWorldInc
********************************************************
Scott Raney raney at metacard.com http://www.metacard.com
MetaCard: You know, there's an easier way to do that...
More information about the use-livecode
mailing list