[Sugar-devel] status of "adding up to 10"?

Bryan Berry bryan at olenepal.org
Thu Jul 23 00:03:22 EDT 2009


it is fine w/ me

I can't remember exactly why crockford doesn't like it
	
On Wed, 2009-07-22 at 22:37 -0500, Felipe López Toledo wrote:
> Hi.
> 
> I know, you've been playing around JS, maybe you have noticed about
> the *new* reserved word and its role.
> according to "Douglas Crockford, JavaScript: The Good Parts", "new" is
> dangerous (I'm agree) and the "Use of this style of constructor
> functions is not recommended".
> 
> others, like "Jhon Resig, Pro JavaScript Techniques" just use it.
> 
> I have found it's really normal to use "new" with JS (prototypal
> inheritance), so I'm using it. If someone wants me to change it. It's
> a really good moment to raise the hand.
> 
> example:
> var p=new Point(1,2);
> 
> also, the OOP style exists "getters" and "setters". 
> var xval = p.getX( )
> p.setX( 2 );
> 
> I prefer 
> var xval = p.x;
> p.x = 2;
> 
> jQuery works in the second way (or at least it's closer)
> 
> felipe
> 2009/7/22 Felipe López Toledo <zer.subzero at gmail.com>
>         working on
>         
>         I think you're going to present "karma", so I'm coding the
>         plugin:
>         jquery.karma.js
>         
>         
>         2009/7/22 Bryan Berry <bryan at olenepal.org>
>         
>         
>                 hey dude, what is the status?
>                 
>                 --
>                 Bryan W. Berry
>                 Technology Director
>                 OLE Nepal, http://www.olenepal.org
>                 
>         
> 
-- 
Bryan W. Berry
Technology Director
OLE Nepal, http://www.olenepal.org



More information about the Sugar-devel mailing list