V
Victor Bazarov
Howard said:And in what way does it "read better"? "If myEvent doesn't exist then
throwX" versus "MyEvent exists OR throw"?
I believe it's a Perl style
dosomething() or die(42);
[..]
V
Howard said:And in what way does it "read better"? "If myEvent doesn't exist then
throwX" versus "MyEvent exists OR throw"?
[..]
I'll never understand why people feel that macros are so bad that they
will work so hard at comming up with some convoluted template mess to
replace them just because they don't like them for some reason.
Oh come on compare it equally at leastAlf said:* Howard:
Assuming any half-decent coding standard:
if(!)nl{nl nl} 9
||; 3
Yes.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Since my template skills are rather underdeveloped, it made sense to
me to join a newsgroup where people considerably more knowledgeable
and skilled than I am in these matters could give me advice. What is
irrational about wanting to learn? Now, it turns out that there just
isn't a template solution to the problem as I defined it, and I've
added something significant to my store of knowledge.
Noah said:Well, that isn't how you brought this up. You didn't say you where
doing this to learn, you said you where doing this to avoid "evil".
Oh come on compare it equally at least
if (!a) ::b; 12 (10 without required spaces)
a != 0 || ::b; 14 (10 without required spaces)
if you think the IF then statement needs the return and brackets for
readability then you are supporting the argument that yours is harder
to read. Personally I think the if is easier for everyone to read
(more common in text and classes) and flow nicely for those who read
the English language more than code. The second is more obscure.
Over all they look to evaluate to the exact same assembler so no foul
either way.
Most instructors and industry professionals say readability (for others
not just you) is more important than spiffy obscure (possibly space
saving) code.
as for the original macro issue check this out
http://www.research.att.com/~bs/bs_faq2.html#macro
as always no one can make you code in any specific way (though it could
cost you your job) but when you disagree with the creator of the
language you use on too many topics you have to wonder if you are
really using the right language.
Roland said:Right! Singleton is an Anti-Pattern.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.