Re: Scripting Style (was: Re: Hiding Slaves)
Re: Scripting Style (was: Re: Hiding Slaves)
- Subject: Re: Scripting Style (was: Re: Hiding Slaves)
- From: has <email@hidden>
- Date: Sat, 14 Sep 2002 15:24:58 +0100
Paul Berkowitz wrote:
>
Unless you're doing it 10,000 times or so in a repeat loop,
>
you won't notice the difference in speed one way or the other
repeat 10000 times
writeOut("Premature optimisation is the root of all evil.")
end repeat
Nuff said. ;)
>
[...] 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]
'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]
--
>
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. ;)
Regards,
The Code Police
[1] No doubt endearing myself even less to those folk who use it... But
diplomacy never was my strong point...
[2] And I write bad code all the time, so I guess I should know.
Still, if anyone does want a long, boring written justification for this
statement, I'll be happy to supply.
--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
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.