Tidbits @ Kassemi

A collection of opinions, thoughts, tricks and misc. information.

Sunday, August 27, 2006

 

To control structures: stop chaning!

**Growl**

Just got a little peeved today. I'm picking up Ruby for my job, and as I go through the online Ruby book I come across the control structures. Standard if/else if/else statements... And Ruby's just happens to be:


if something
do
elsif something
do
else
do
end


Now, these are commands that are issued hundreds of times a day by programmers everywhere. Actually having to THINK about how to do your control structures will take valuable time away from placing that concept into code... Why the heck can't we keep certain things standard?

C/C++/Javascript:


if(something){
do;
}else if(something){
do;
}else{
do;
}


Python:

if something:
do
elif something:
do
else:
do


Okay. Shame on you python and ruby. The short cuts mean less effort typing, but much more effort for those of us (most of us) who have to code between languages daily. Ah. Daily rant.

Good day,
James

Comments: Post a Comment



<< Home

Archives

August 2005   September 2005   October 2005   November 2005   December 2005   January 2006   February 2006   March 2006   April 2006   June 2006   July 2006   August 2006   September 2006   October 2006   November 2006  

This page is powered by Blogger. Isn't yours?