473,654 Members | 2,974 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What I like most about C++

Is that I can approximate using my ideal of a language in it. On the flip
side, what I dislike most about it is all the
flak/protecting-the-golden-calf one gets when using it that way.

I think a lot of the template discussions are like talking about .net or
similar and that brain power is being wasted along with progress. For
instance, when I see examples given in solution of a problem and then I see
that the code is template-based, I ignore it.

I have a good analogy of how templates strike me (read, "the flavor of
templates"): Remember when Indy car racing was turbo charged? Yeah, all the
development was going into turbos instead of engines. I think templates are
having similar effect on C++. Give me well-designed naturally aspirated
instead of
exploding/heat-producing/back-pressure-producing/complexity-introducing
turbos any day!

John
May 24 '07 #1
17 1996
Me
On Thu, 24 May 2007 03:56:16 +0000, Noone wrote:
Is that I can approximate using my ideal of a language in it. On the
flip side, what I dislike most about it is all the
flak/protecting-the-golden-calf one gets when using it that way.
Use it whatever way works for YOU. Just keep in mind that modern
programming paradigms are suppose to encourage code being easily
supported by others and being reusable.

I think a lot of the template discussions are like talking about .net or
similar and that brain power is being wasted along with progress. For
instance, when I see examples given in solution of a problem and then I
see that the code is template-based, I ignore it.
Just my humble opinion, but if you ignore template based code out of hand
then you are not fully appreciating the strength of the language.

I have a good analogy of how templates strike me (read, "the flavor of
templates"):
Vanilla, as they should be...

Remember when Indy car racing was turbo charged? Yeah, all
the development was going into turbos instead of engines. I think
templates are having similar effect on C++. Give me well-designed
naturally aspirated instead of
exploding/heat-producing/back-pressure-producing/complexity-introducing
turbos any day!
If c++ didn't have template capabilities then my current project would be
six or seven times as large as it needs to be because of all the custom
operations I would have to reimplement for specific data types.

stack<stringsta ck_of_strings;
vector<floatsom e_floats;
class my_class;
map<int, my_classmy_map;

Now think about all the code writing I saved instead of having to
implement each of the above for each specific data type I wanted to
collect. Not to mention, string is itself a template class. Are you
saying that you won't use the string class because it is implemented using
templates?

This is stuff that colleges should be giving students an appreciation
for. If they aren't then the schools are not doing their job.
My appologies to the regulars for not resisting feeding of the trolls. :^)
May 24 '07 #2
JohnQ wrote:
Is that I can approximate using my ideal of a language in it. On the flip
side, what I dislike most about it is all the
flak/protecting-the-golden-calf one gets when using it that way.
Your trolls are becoming tedious.

--
Ian Collins.
May 24 '07 #3
On May 23, 11:56 pm, "JohnQ" <johnqREMOVETHI Sprogram...@yah oo.com>
wrote:
Is that I can approximate using my ideal of a language in it. On the flip
side, what I dislike most about it is all the
flak/protecting-the-golden-calf one gets when using it that way.

I think a lot of the template discussions are like talking about .net or
similar and that brain power is being wasted along with progress. For
instance, when I see examples given in solution of a problem and then I see
that the code is template-based, I ignore it.

I have a good analogy of how templates strike me (read, "the flavor of
templates"): Remember when Indy car racing was turbo charged? Yeah, all the
development was going into turbos instead of engines. I think templates are
having similar effect on C++. Give me well-designed naturally aspirated
instead of
exploding/heat-producing/back-pressure-producing/complexity-introducing
turbos any day!

John
Nobody forces you to templatize anything or everything.
I fail to see what you find turbo-ish about templates. They are
relatively simple and a tiny effort affords you many, many dividends.
It just doesn't make sense to redesign a car from scratch just cause
you changed the fuel or the race has new specs. Thats folly.

A wheel is a wheel, whether aluminum or some other alloy is involved,
its still a wheel.
If the design changes, its still a wheel.
If its profile changes, its still a wheel.
Now lets suppose you have 100 materials, 10 profiles and 700
designs...

Is your arguement that the effort of writing 700,000 wheel structures
doesn't beg for a template?
How many more materials, profiles and designs will be added tommorrow?
After all, thats the ultimate goal of a template.
It works with anything, including what doesn't exist yet.

May 24 '07 #4

"Me" <no***@all.comw rote in message
news:pa******** *************@a ll.com...
On Thu, 24 May 2007 03:56:16 +0000, Noone wrote:
>Is that I can approximate using my ideal of a language in it. On the
flip side, what I dislike most about it is all the
flak/protecting-the-golden-calf one gets when using it that way.

Use it whatever way works for YOU. Just keep in mind that modern
programming paradigms are suppose to encourage code being easily
supported by others and being reusable.

>I think a lot of the template discussions are like talking about .net or
similar and that brain power is being wasted along with progress. For
instance, when I see examples given in solution of a problem and then I
see that the code is template-based, I ignore it.

Just my humble opinion, but if you ignore template based code out of hand
then you are not fully appreciating the strength of the language.

>I have a good analogy of how templates strike me (read, "the flavor of
templates"):

Vanilla, as they should be...

>Remember when Indy car racing was turbo charged? Yeah, all
the development was going into turbos instead of engines. I think
templates are having similar effect on C++. Give me well-designed
naturally aspirated instead of
exploding/heat-producing/back-pressure-producing/complexity-introducing
turbos any day!

If c++ didn't have template capabilities then my current project would be
six or seven times as large as it needs to be because of all the custom
operations I would have to reimplement for specific data types.

stack<stringsta ck_of_strings;
vector<floatsom e_floats;
class my_class;
map<int, my_classmy_map;

Now think about all the code writing I saved instead of having to
implement each of the above for each specific data type I wanted to
collect. Not to mention, string is itself a template class. Are you
saying that you won't use the string class because it is implemented using
templates?

This is stuff that colleges should be giving students an appreciation
for. If they aren't then the schools are not doing their job.
Templates are fine for containers and algorithms, but I like to keep them
for that only.

John
May 25 '07 #5

"Salt_Peter " <pj*****@yahoo. comwrote in message
news:11******** *************@o 5g2000hsb.googl egroups.com...
On May 23, 11:56 pm, "JohnQ" <johnqREMOVETHI Sprogram...@yah oo.com>
wrote:
>Is that I can approximate using my ideal of a language in it. On the flip
side, what I dislike most about it is all the
flak/protecting-the-golden-calf one gets when using it that way.

I think a lot of the template discussions are like talking about .net or
similar and that brain power is being wasted along with progress. For
instance, when I see examples given in solution of a problem and then I
see
that the code is template-based, I ignore it.

I have a good analogy of how templates strike me (read, "the flavor of
templates"): Remember when Indy car racing was turbo charged? Yeah, all
the
development was going into turbos instead of engines. I think templates
are
having similar effect on C++. Give me well-designed naturally aspirated
instead of
exploding/heat-producing/back-pressure-producing/complexity-introducing
turbos any day!

John

Nobody forces you to templatize anything or everything.
I fail to see what you find turbo-ish about templates.
Too much emphasis on them.

John
May 25 '07 #6

"Ian Collins" <ia******@hotma il.comwrote in message
news:5b******** *****@mid.indiv idual.net...
JohnQ wrote:
>Is that I can approximate using my ideal of a language in it. On the flip
side, what I dislike most about it is all the
flak/protecting-the-golden-calf one gets when using it that way.
Your trolls are becoming tedious.
If you don't like out-of-the-box thinking, don't read my posts

John
May 25 '07 #7
On May 24, 10:21 pm, "JohnQ" <johnqREMOVETHI Sprogram...@yah oo.com>
wrote:
"Salt_Peter " <pj_h...@yahoo. comwrote in message

news:11******** *************@o 5g2000hsb.googl egroups.com...
On May 23, 11:56 pm, "JohnQ" <johnqREMOVETHI Sprogram...@yah oo.com>
wrote:
Is that I can approximate using my ideal of a language in it. On the flip
side, what I dislike most about it is all the
flak/protecting-the-golden-calf one gets when using it that way.
I think a lot of the template discussions are like talking about .net or
similar and that brain power is being wasted along with progress. For
instance, when I see examples given in solution of a problem and then I
see
that the code is template-based, I ignore it.
I have a good analogy of how templates strike me (read, "the flavor of
templates"): Remember when Indy car racing was turbo charged? Yeah, all
the
development was going into turbos instead of engines. I think templates
are
having similar effect on C++. Give me well-designed naturally aspirated
instead of
exploding/heat-producing/back-pressure-producing/complexity-introducing
turbos any day!
John
Nobody forces you to templatize anything or everything.
I fail to see what you find turbo-ish about templates.

Too much emphasis on them.

John
So ignore it. If someone wants to write their own code using
templates, let them, but don't think that because YOU don't like/use a
feature of a language, that it should be banished from the language.

--MathStuf

May 25 '07 #8
On May 25, 4:21 am, "JohnQ" <johnqREMOVETHI Sprogram...@yah oo.com>
wrote:
"Me" <n...@all.comwr ote in message
Templates are fine for containers and algorithms, but I like
to keep them for that only.
And smart pointers, and any number of other things.

They're a tool. Use them when they make the code more readable
and easier to maintain. I avoid them when they make the code
less readable and harder to maintain. Having used C++ before
templates (and having written containers and smart pointers
using <generic.h>), I certainly don't want to go back.

--
James Kanze (GABI Software) email:ja******* **@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientier ter Datenverarbeitu ng
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

May 25 '07 #9
On Thu, 24 May 2007 03:56:16 +0000, JohnQ wrote:
Is that I can approximate using my ideal of a language in it. On the
flip side, what I dislike most about it is all the
flak/protecting-the-golden-calf one gets when using it that way.
[snip JohnQ stock anti-template rant]

Ok, you have issues with templates in C++. Here's what to do:

(1) Don't use templates.

(2) Stop trolling c.l.c++ with tedious anti-template rants.

--
Lionel B
May 25 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

220
18995
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have any preconceived ideas about it. I have noticed, however, that every programmer I talk to who's aware of Python is also talking about Ruby. So it seems that Ruby has the potential to compete with and displace Python. I'm curious on what basis it...
54
6543
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO FRICKIN' COOL!!! ***MAN*** that would save me a buttload of work and make my life sooooo much easier!" As opposed to minor differences of this feature here, that feature there. Variations on style are of no interest to me. I'm coming at this from a...
92
6441
by: Reed L. O'Brien | last post by:
I see rotor was removed for 2.4 and the docs say use an AES module provided separately... Is there a standard module that works alike or an AES module that works alike but with better encryption? cheers, reed
137
7053
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very pragmatic - 3) I usually move forward when I get the gut feeling I am correct - 4) Most likely because of 1), I usually do not manage to fully explain 3) when it comes true. - 5) I have developed for many years (>18) in many different environments,...
125
14702
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from software giant such as Microsoft SQL Server, Oracle, and Sybase? Is PostgreSQL reliable enough to be used for high-end commercial application? Thanks
121
10023
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode support IDEs are DreamWeaver 8 and Zend PHP Studio. DreamWeaver provides full support for Unicode. However, DreamWeaver is a web editor rather than a PHP IDE. It only supports basic IntelliSense (or code completion) and doesn't have anything...
46
4197
by: Keith K | last post by:
Having developed with VB since 1992, I am now VERY interested in C#. I've written several applications with C# and I do enjoy the language. What C# Needs: There are a few things that I do believe MSFT should do to improve C#, however. I know that in the "Whidbey" release of VS.NET currently
13
5035
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
8
3144
by: Midnight Java Junkie | last post by:
Dear Colleagues: I feel that the dumbest questions are those that are never asked. I have been given the opportunity to get into .NET. Our organization has a subscription with Microsoft that basically entitled to us to just about every .Net development tool you can imagine. I cant even begin to mention them. To begin with, my background is not that of a programmer, but a systems engineer and the closest I have come to "programming"...
669
25857
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Languageâ€, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic paper written on this subject. On the Expressive Power of Programming Languages, by Matthias Felleisen, 1990. http://www.ccs.neu.edu/home/cobbe/pl-seminar-jr/notes/2003-sep-26/expressive-slides.pdf
0
8707
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8482
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8593
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7306
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6161
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1593
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.