Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Curly braces

Name: Anonymous 2008-04-21 17:12

Why would anyone seriously want to use curly braces to denote scope? Surely significant indentation, or implicit scope based on the surrounding keywords, is far superior.

Also consider this: every time you wish to enter { or }, you must hold down the shift key. That is one extra wasted keypress per scopening and sclosing.

And it just looks messy, like a spastic has been scribbling nonsense all over your screen.

Name: Anonymous 2008-04-22 20:00

>>47

The ability to do an assignment in the conditional of the if statement, like so

if (ptr = new Whatever())
    // handle any possible NULL pointer, such as from insufficient memory


Alternatively,
if ((ptr = new Whatever()) == NULL)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List