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:08

>>48

Thats just not good practice. The if statement is actually responsible for assignment, its resposible for chacking the result. Thats 2 different things and should be convey as such in your code. Especially since it makes more sense to assign a value to something at its declaration for many reasons, and because you aren't going to be declaring something in the statement of an if statement.

1. Perform assignment
2. Check the assignment

Grouping it together doesn't produce a more performant execyltable or more readable and maintainable code.

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