Thanks for the suggestions :)<br><br><div class="gmail_quote">On Fri, Jul 24, 2009 at 6:15 AM, Lucian Branescu <span dir="ltr"><<a href="mailto:lucian.branescu@gmail.com">lucian.branescu@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><a href="http://www.jslint.com/" target="_blank">http://www.jslint.com/</a>, made by Crockford himself.<br>
<br>
There are others as well.<br>
<br>
2009/7/24 Tomeu Vizoso <<a href="mailto:tomeu@sugarlabs.org">tomeu@sugarlabs.org</a>>:<br>
<div><div></div><div class="h5">> On Thu, Jul 23, 2009 at 14:20, Lucian Branescu<<a href="mailto:lucian.branescu@gmail.com">lucian.branescu@gmail.com</a>> wrote:<br>
>> Crockford doesn't like it because if you forget to put new for a class<br>
>> declaration that otherwise needs it, all the attributes in the class<br>
>> are set on the global namespace. Hence, dangerous to forget.<br>
>><br>
>> He suggests using factory functions, that create and return objects instead.<br>
><br>
> Are there static analysis tools such as pylint for JS? Might help<br>
> catching up these situations.<br>
><br>
> Regards,<br>
><br>
> Tomeu<br>
><br>
>> Either way is fine, as long as your framework code is non-invasive.<br>
>><br>
>> 2009/7/23 Bryan Berry <<a href="mailto:bryan@olenepal.org">bryan@olenepal.org</a>>:<br>
>>> it is fine w/ me<br>
>>><br>
>>> I can't remember exactly why crockford doesn't like it<br>
>>><br>
>>> On Wed, 2009-07-22 at 22:37 -0500, Felipe López Toledo wrote:<br>
>>>> Hi.<br>
>>>><br>
>>>> I know, you've been playing around JS, maybe you have noticed about<br>
>>>> the *new* reserved word and its role.<br>
>>>> according to "Douglas Crockford, JavaScript: The Good Parts", "new" is<br>
>>>> dangerous (I'm agree) and the "Use of this style of constructor<br>
>>>> functions is not recommended".<br>
>>>><br>
>>>> others, like "Jhon Resig, Pro JavaScript Techniques" just use it.<br>
>>>><br>
>>>> I have found it's really normal to use "new" with JS (prototypal<br>
>>>> inheritance), so I'm using it. If someone wants me to change it. It's<br>
>>>> a really good moment to raise the hand.<br>
>>>><br>
>>>> example:<br>
>>>> var p=new Point(1,2);<br>
>>>><br>
>>>> also, the OOP style exists "getters" and "setters".<br>
>>>> var xval = p.getX( )<br>
>>>> p.setX( 2 );<br>
>>>><br>
>>>> I prefer<br>
>>>> var xval = p.x;<br>
>>>> p.x = 2;<br>
>>>><br>
>>>> jQuery works in the second way (or at least it's closer)<br>
>>>><br>
>>>> felipe<br>
>>>> 2009/7/22 Felipe López Toledo <<a href="mailto:zer.subzero@gmail.com">zer.subzero@gmail.com</a>><br>
>>>> working on<br>
>>>><br>
>>>> I think you're going to present "karma", so I'm coding the<br>
>>>> plugin:<br>
>>>> jquery.karma.js<br>
>>>><br>
>>>><br>
>>>> 2009/7/22 Bryan Berry <<a href="mailto:bryan@olenepal.org">bryan@olenepal.org</a>><br>
>>>><br>
>>>><br>
>>>> hey dude, what is the status?<br>
>>>><br>
>>>> --<br>
>>>> Bryan W. Berry<br>
>>>> Technology Director<br>
>>>> OLE Nepal, <a href="http://www.olenepal.org" target="_blank">http://www.olenepal.org</a><br>
>>>><br>
>>>><br>
>>>><br>
>>> --<br>
>>> Bryan W. Berry<br>
>>> Technology Director<br>
>>> OLE Nepal, <a href="http://www.olenepal.org" target="_blank">http://www.olenepal.org</a><br>
>>><br>
>>> _______________________________________________<br>
>>> Sugar-devel mailing list<br>
>>> <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
>>> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
>>><br>
>> _______________________________________________<br>
>> Sugar-devel mailing list<br>
>> <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
>> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
>><br>
><br>
</div></div></blockquote></div><br>