Delphi 2007 Handbook








May 24, 2006

Save me from Cleverness... and Curly Braces

An article by Peter Coffee, a comment by Ray Konopka, and jet another Delphi thread on Joel's discussion board.

I'm quite busy these days, but I did notice some interesting articles today, so I thought about posting a few links.

First, Peter Coffee writes on eweek.com about cleverness in coding as a "bad thing": smart code (often in C language, but not always) can be fun to write, but very hard to read... and bugs slip through more easily. So, after the recent discussions about language styles, I though this was a relevant point. It is true that the more modern C-style languages generally forbid the low-level C hacks, but at times you do see the same coding style and approach. Delphi is not spared either, but its Pascal roots do save some hassles.

Actually what took me to the post is the superb comment by Ray Konopka in the Delphi non-tech forum: " One more reason I love Delphi". Here is the full thread, in my newer unfinished newsgroup front end.

Finally, Nick Hodges sent me to yet another discussion about Delphi as the best-tool-for-Windows-client-applications thread. Nice reading. I'm mentioned a couple of times, my books even more!





 

2 Comments

Save me from Cleverness... and Curly Braces 

From some post from the "best-tool-for-Windows-
client-applications thread" is clear the damage 
Borland is causing by taking months to "divest" the 
IDE products. But hey!, playing golf in a $400.000 
club should be cool... why should they bother about 
the rest? <g>
Comment by Luigi D. Sandon on May 24, 17:57

Save me from Cleverness... and Curly Braces 

 another example on C "cleverness" is the following:

void remove(char* path, bool recursive=false)
{
  [...]
  remove(newpath), recursive;
  [...]
}

The code is more complex with more braces but the 
main idea is that I close the brace on the wrong 
place. It compiles as it should but works the way i 
didn't want it to.

Another design flow that kills me is C strings but 
that's another story.
Comment by Muzaffar Mahkamov on May 27, 22:33


Post Your Comment

Click here for posting your feedback to this blog.

There are currently 0 pending (unapproved) messages.