***
bi******@gmail.com wrote/escribió (4 Jul 2005 04:47:10 -0700):
Why would people use the shortened version?
I find it much harder to read, and I doubt that it will shave off many
milliseconds
It saves lines of code, that's all its purpose. Unless the sentence is
really complicated, I prefer to see more code at a time in screen. A
classical example (JavaScript):
function set_cookie (name, value,expires) {
var argv = set_cookie.arguments;
var argc = set_cookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
--
-- Álvaro G. Vicario - Burgos, Spain
--
http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--