Re: Scripting Style (was: Re: Hiding Slaves)
Re: Scripting Style (was: Re: Hiding Slaves)
- Subject: Re: Scripting Style (was: Re: Hiding Slaves)
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 14 Sep 2002 08:01:11 -0700
On 9/14/02 7:24 AM, "has" <email@hidden> wrote:
>
>
> [...] it's more a matter of personal taste: some
>
> people prefer to it it the "textbook" way 'as string'.
>
>
Being a thoroughly uncharitable and unkind sort, I'd tend to attribute it
>
not to "taste" but to faddishness, cargo cult, cleverness for its own sake,
>
deliberate obfuscation, L33Tness, etc. [1]
Although all that is quite probably true, I think John mostly doesn't like
typing.
>
>
'As string' is entirely unambiguous, dirt simple to read and understand.
>
That empty string concatenation is not (as Ken's post has just
>
demonstrated). It's just bad programming. [2]
It's not bad programming, since the ASLG gives it as a valid method. It's in
there - go check. They happen to use longer strings than "", but it's the
same method. It certainly is not as clear or easy to read when used as an
educative tool, as this mailing is. I actually moved over to 'as string'
myself about a year and a half ago, since I'd rather be clear than a party
to 'deliberate obfuscation', etc. also - why not be more efficient, even for
1/10,000th of a second? Nevertheless, Applescript gives many ways of doing
things, and that one is valid and works.
>
>
--
>
>
> property u : ("" as Unicode text)
>
>
>
> set hidFolderPath to ((u & (path to scripts folder)) & ".hid")
>
>
First person to do this, I kill just on General Principles.
>
>
You've been warned. ;)
What i do all the time is
property lf : (ASCII character 10)
for real, substantial efficiency improvements throughout a script, since it
saves hundreds or thousands of calls to a scripting addition . Are you going
to kill me too? Personally, I think 'lf' is clearer than 'ASCII character
10' as well, but AS-Users ought to be able to read property declarations in
any case.
>
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.