[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Syntax and redundancy
- From: Adrian Sietsma <adrian_groups@...>
- Date: Wed, 31 Aug 2005 10:56:36 +1000
Conclusion: concision is not the issue. The issue is personal taste.
The "conciseness" of C is mostly illusory. :)
conciseness has no abstract meaning.
code size (input characters) depends on so many things.
i can write socket code in less lines/chars of lua than c, using luasocket
(thanks diego)
but in c++, i can use a socket class to do similar.
you can't say that
"t = http:request(.....) " is less keystrokes than a native c implementation
of the same.
that said, i find lua is easy to _read_, which is one of the most important
factors in code longevity / re-use.
and yes, any long conditions end up coded like
if (a > b) then -- may comment this, if logic is unclear
....
else -- may comment this
...
end -- if (a>b) usually comment this, but maybe as "end -- if (colour test)"
i know the () are redundant, but i write a lot of c, and get used to
enclosing tests, especially "a and nor b or c " types.
nb - it all goes pear-shaped when you change the test and not the comment. i
have spent hours believing the comment, not the code.
Adrian
- References:
- Syntax and redundancy, Gavin Wraith
- Re: Syntax and redundancy, David Olofson
- Re: Syntax and redundancy, Rici Lake
- Re: Syntax and redundancy, Aaron Brown
- Re: Syntax and redundancy, Adrian Perez
- Re: Syntax and redundancy, Rici Lake
- Re: Syntax and redundancy, Boyko Bantchev
- Re: Syntax and redundancy, Rici Lake
- Re: Syntax and redundancy, Boyko Bantchev
- Re: Syntax and redundancy, Rici Lake
- Re: Syntax and redundancy, Boyko Bantchev
- Re: Syntax and redundancy, Rici Lake
- Re: Syntax and redundancy, Chris Marrin