Overuse of Templates

B

belvis

Ted said:
One reason I avoid
C++ templates is because of the implementation complexity in the compiler.

I still don't get this. How does it matter to your effectiveness as a
programmer whether a feature in the compiler was difficult for someone
else to implement?
? I haven't used the optimization settings in my compiler for years.

And because you don't need them, no one else does? Just like templates,
I guess.
He couldn't do it and I could.

In his very first post to your thread on c.l.c++.m he said he had used
the preprocessor to generate generic code. Do you think he was lying?
Sorry. I'm not buying your spiel. Is it 10 times more work or not?

I don't know; what if it's only 9 times more work? Would that make you
right? How about 8 times?

Instead of getting hung up on trivialities like whether it's 10 times
more work or not, you should pay attention to the meat of the point,
which is: Preprocessor-generated generic code is more work than using
templates.
Saying "10 times more work" means that you either are exaggerating or that
you don't know how to do it.

You left out "or that you do know how to do it and chose to use a
casual idiom to express its difficulty."
Which is it? This needs clarification because

Because Ted would rather pick on conversational idioms than address the
technical content.
it is being used as reason why preprocessor-based templates are deficient
compared to C++ templates. It's misinformation for the uninitiated coming
into the group and reading that.

How can you seriously consider a common colloquialism like "10 times"
(meaning "a lot more", not a literal numerical factor) to be _more_
misinformative than advising that a major component of C++ should be
avoided in favor of an inferior manual replacement?

Bob
 
T

Ted

Gianni Mariani said:
Please summarize your issue. I have no idea what your problem is.

No problem. They censored the posts and I put them here. Anyone can
now read the thread and draw their own conclusions. I'm not going to
post big-picture-related stuff in clc++m anymore because they can't
deal with it. If they just want to be "tech support", fine, no skin off my
nose.

Ted
 
T

Ted

So you write your own compiler? If not, why are you concerned? Do you
stick with vinyl because CD replay is complex?

I avoid some C++ features that are unnecessarily complex (and I'll probably be
avoiding more of them in the future).
Ever written code for an embedded device with cost constraints?

Ever seen a product that was designed to be so general or so full of "features"
that it was a PITA to use in any application?
I can't see your point, would you rather write the same code any times
for different types?

Go back and read the whole thread. (I use preprocessor-based templates).

Ted
 
I

Ian Collins

Ted said:
I avoid some C++ features that are unnecessarily complex (and I'll probably be
avoiding more of them in the future).
Complex to whom?



Ever seen a product that was designed to be so general or so full of "features"
that it was a PITA to use in any application?
I'll take that as a no.



Go back and read the whole thread. (I use preprocessor-based templates).
I did, not that it made much sense. Mainly piss and wind, completely
lacking in real world examples.

All in all one of the most successful trolls I've seen in these parts
for a long while. Ever tried stand-up comedy?
 

Ask a Question

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.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,167
Latest member
SusanaSwan
Top