Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Coding, syntax & commands
Environment versions
Network:
Windows 2003 Server
>I think this is a perfect example of why readability is a false argument when deciding a coding practice, as I (and other posters in the same small thread) found the first option more readable than the second one and others (you included) find the other way around more readable, so which one is more readable is not an answerable question in my opinion, thus looking into other advantages each option has should be the deciding factor, never readability (of course using common sense, if someone finds more readable writing the whole program in only one line...)
>
>For example, what if you in the future need to change the value of some of the assignments? You will need to break the line and use one or more extra lines and in the extreme case (not for your Boolean example thou) you will end up with one line per assignment anyways (each assignment with a different value). Furthermore you are more likely to make more mistakes by splitting the line than by just changing the assignment of the properties you need to change if they were in their own line.
>
>Of course, sometimes STORE is the best answer for you can assign to a variable dynamically (ie. Store {value} to ({variable}), but then again, we are not discussing readability any longer.
Steve McConnell I believe said variable declarations should be separate lines. I'm sure he wasn't talking Fox. I'm with you. Each line is a separate line. There'd have to be thousands of vars to justify using a single line to speed things up, or a function called many many times.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only