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

optimal width of line of code

Name: Anonymous 2011-05-07 15:11

Why people want to keep those tight limits of width of line of code? What is more readable?

bar = baz().foo().foo().foo().foo().foo().foo().foo().foo().foo().foo().foo().foo().foo().foo().foo().foo().foo().foo().foo()

or:

[pre]a = baz().foo().foo().foo().foo().foo().foo()
b = a.foo().foo().foo().foo().foo().foo().foo()
bar = b.foo().foo().foo().foo().foo().foo()[/pre]

For me first option is much better, because i don't heave to remember, what a, b means.

Name: Anonymous 2011-05-07 16:09


void ExpertInternetTrollDispatcher::terminate_trolls() {
    if (destroy_trolls_) {
        try {
            for (std::vector<ExpertInternetTroll>::const_iterator itr = trolls_.begin(), end = trolls_.end(); itr != end; ++itr) {
                trolls.terminate();
            }
        }
        catch (...) {
            std::cout << "A troll tried to elude us!" << std::endl;
            throw;
        }

        trolls.clear();
    }
}

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