[dojo-contributors] Should connect take string id's for nodes?

Eugene Lazutkin eugene at lazutkin.com
Tue Jun 5 16:35:54 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

+1 --- I agree with previous comments on performance and "magic" but I
think that Owen is right --- this is an extremely common case and stuff
like that:

dojo.something(dojo.byId("handle"))

looks verbose, and less readable to me. Unrolling it in two statements
without the reason looks even more like the case "more code than needed".

Thanks,

Eugene

> Owen Williams wrote:
>> +1 -- Sounds useful to me, the cost seems outweighed by the convenience.
> 
> 
> 
>> On Jun 5, 2007, at 11:23 AM, Scott J. Miles wrote:
> 
>>> Hi,
>>>
>>> I am considering altering dojo.connect so that you can pass a string
>>> (id) for a node as the first argument.
>>>
>>> The cost would essentially be a call to dojo.isString() for every
>>> connect (and a call to dojo.byId() for every connect to a node).
>>>
>>> I imagine this seems like an incredibly minor thing, but I try to
>>> consider every cycle used in _base code.
>>>
>>> Regards,
>>> Scott J. Miles
>>> TurboAjax Group
>>> http://www.turboajax.com
>>> _______________________________________________
>>> dojo-contributors mailing list
>>> dojo-contributors at dojotoolkit.org
>>> http://dojotoolkit.org/mailman/listinfo/dojo-contributors
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGZckqY214tZwSfCsRAoTQAKC3+N/pA4uU03v7unSl16kooQt0rwCfT2nc
4loZ59WuL9hmwZ68Rc5nRwo=
=8cWO
-----END PGP SIGNATURE-----



More information about the dojo-contributors mailing list