If it ain’t broken don’t fix it

Yet another worthless blog… by Uberto Barbini

Explicit is better than implicit!

Posted by Uberto Barbini on March 25, 2008

Today at work I gave a little help with Javascript to a collegue of mine, he’s a very bright guy but he is touching Javascript for the first time.

So after a little of pairing, we saw that in a line a class method was used as it was a standalone function.

Given that there’s no ide for javascript and the code was not properly indented, the problem is more trickier than it seems.

Later, he asked me how can you easily tell them apart… not very easy unless you start counting the braces. (if someone know a better way please tell me).

So now I have finally understood how convenient is that Python uses an explicit this for each class method.

Better late than never…

or in Italian “Fino alla bara sempre si impara”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: