What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Browse For File

Pages: (2): « First « 1 [ 2 ] Last »
Browse For File
Author: Message:
Amec
Junior Member
**


Posts: 19
32 / Male / Flag
Joined: Sep 2008
RE: RE: Browse For File
quote:
Originally posted by CookieRevised
I can read the program and I am 100% confident in knowing what it is going to do and that it is going to work correctly.
You and I might know that it's going to work correctly, but what happens when someone new to ECMAScript copy+pastes your code? They're not going to know all the caveats that go with using with(). What if they want to edit it?


Edit: I just realised that the script is with'ing on a DataBloc interface, which always has the same members, and hence there's no ambiguity. lol

This post was edited on 04-14-2011 at 07:54 PM by Amec.
04-14-2011 07:53 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Browse For File
quote:
Originally posted by Amec
quote:
Originally posted by CookieRevised
I can read the program and I am 100% confident in knowing what it is going to do and that it is going to work correctly.
You and I might know that it's going to work correctly, but what happens when someone new to ECMAScript copy+pastes your code? They're not going to know all the caveats that go with using with(). What if they want to edit it?
Sure, but that's the exact reason why I posted that code, it doesn't need to be edited anymore (in most cases). The previous code had quite a few things people needed to edit in order to let it work properly in their scripts and it even contained potential bugs.

Either way, you can say the same thing for like 75% of code in any snippet. If you're new to scripting you shouldn't start editing without knowing what you're doing. That goes for with() usage but that goes for most other statements and methods too from the simpliest to the hardest to understand.

EDIT:
quote:
Originally posted by Amec
Edit: I just realised that the script is with'ing on a DataBloc interface, which always has the same members, and hence there's no ambiguity. lol
still... you do have a small point when it wasn't though. But so do I, I like to believe (one shouldn't use statements nor edit stuff you don't know... and of course... testing is key).

This post was edited on 04-14-2011 at 08:02 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
04-14-2011 07:58 PM
Profile PM Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On