Given that the source isn't included, I can't help but wonder at what the code looks like, especially given statements like In fact, Eiffel (by its use of copy-by-reference instead of by-value) could realize big wins over C++ , which shows an apparent unfamiliarity with C++ reference parameters, which can make huge differences in execution time with strings.
But then, C++ is the only language (to my knowledge) that allows you to use safe arrays where you want them, and faster, unsafe arrays where you want them, without having to set compiler options that change everything globally:
int unsafe_array[10]; vector<int> safe_array;
This way, I can put a carefully tested unsafe array in that one tight loop that was eating up all the cpu while using safe arrays for virtually everything else.
Much of the problem isn't so much the lack of language features as it is with general ignorance about the availability of certain language features. Not enough people use the STL classes. Though I suppose that one could argue that the complexity of the language gaurantees this.
Well versed in programming languages but not particularly well-versed in real world programming. There is a reason while languages like C, C++ and perl are successful. It is a) because they don't tell you what you shouldn't do and b) do what you want them to do quickly. Changing C++ to meet most of that guy's criticisms would either mean keeping programmers from doing what they want to, or would make the language less efficient.
There is a reason why "academic" languages rarely make it out of acadamia. I remember the PC world in 1986. Pascal made it to the PC first. There is a reason that C became the language of choice on the PC rather than Pascal. It is because it is a practical language, not a language that follows what computer science professors think a language ought to do.
1) Read "The Design and Evolution of C++". It contains a lot of information on efficiency and C++.
2) You can write something that looks pretty much like C, but compiles under C++. You can then conservatively pull in C++ features that will help you. This can help you get over efficiency concerns.
Anyway, if you learn to write good C++ code, you'll find that it is nearly as fast and small as good C code. The idea that C++ is ineffecient usually comes from people who dive in and use lots of C++ constructs without understanding the costs.
In Design and Evolution of C++ he gives very specific reasons why garbage collection is optional. One of the main design goals of C++ was to allow programs to be written that were as efficient of C. Non-optional garbage collection would have made this difficult or impossible.
He explicitly says that his worst mistake was not including enough basic library classes with the first releases. He's right. One of the biggest headaches has been the amount of time it took to get standard string, list, hash, etc. classes.
And, as I said before, every C++ programmer feels bound by some mystic promise to use every damn element of the language on every project. Actually, that really annoys me sometimes, even though it serves my original purpose.
Yes, this is in jest, though unfortunately the above is an all too real problem. One of the beauties of C++ is that you don't have to use all the cool OO features. Unfortunately, many poor C++ coders feel bound and determined to.
I guess it depends on what you mean by "systems programming". I've written some Windows NT services (the NT equivalent of a daemon) and used C++ every time. More to the point, if you do anything with COM, you almost have to use C++. (It isn't a requirement, but COM is incredibly painful with C.) COM objects are systems type things.
To answer your question, C++ can't really be more efficient than C because it is pretty much C with object-oriented extensions. But by the same token, it is fairly easy to write a C++ program that performs as well as a C one. Just be careful about the object oriented extensions you use.
Over the course of the last ten years, we've seen some fairly significant changes in C++. Things like the addition of exception handling, templates, the standard template library. Do you think that things have now settled down, or will we see similar changes over the next ten years?
Also, as a Windows programmer, I spend much of my time grappling with imperfect implementations and proprietary versions of classes. As an example, most Windows programs seem to use the Microsoft specific CString rather than the standard std::string operator for strings. This can cause problems because of the poor way Microsoft has implemented their versions of some of these classes. Is this a problem that will continue to plague us, or do you see all vendors moving towards better support for the standards instead of proprietary APIs?
* I need to solve a chicken/egg problem to get web access (for instance, OmniWeb betas, the OPENSTEP browser come with a limited license. When it expires, you cannot launch it. And the only way to get the updated beta is to use http.:-( )
This sort of thing always amazes me. I once had to install Microsoft IE on a laptop that didn't have it (don't ask) and discovered that the only way I could do it was to first download Netscape using ftp, and then use that to download IE. Microsoft has an FTP site, but doesn't seem to bother to put newer versions of their software there.
Which is another huge pet-peeve of mine. As someone who does a lot of downloading over a telnet connection, it really ticks me off when people want you to use http to download software. Make a link to an ftp site!
What makes it particularly confusing is that many "crackers" call themselves "hackers", and reserve the term "cracker" for someone who "cracks" the copy protection on software.
Let me add a "hell, yeah!" to this. I'm still required to keep Windows running at home for various reasons, but use a Linux machine for fun. However, even if I never used the Linux machine directly, it'd still be damn useful. I now had DSL, but there is no way in hell I'd hook up my Win95 box to a direct connection. Now I've got a nice little firewall that took very little time to set up and cost nothing.
Also, Samba works damn well as a file-server. One of my problems on my Win95 box was the %$&$%@ 2 Gig partition limit. I could upgrade to Win98, but having upgrade Windows many times, I know the sort of pain that can cause one to endure. Easier was to install a new hard drive on the Linux machine, and create a nice big shareable partition on it.
Anyway, Samba works really, really well and if anyone were to ask me to recommend a good file/print server for Windows, I'd recommend a Linux box long before a Windows machine.
It costs almost nothing to stand in a US election. Getting enough cash to get the press to notice you is another thing.
If I recall correctly, "officially" running for president is merely a matter signing up with the FEC. This won't get you on the ballot, though. In that, the restrictions vary wildly by state. In some states, the restrictions are bad enough that only the two major parties get on. In others, pretty much any party who signs up gets on. In my state (California), we tend to have the following parties on the ballot:
Republican
Democrat
Reform
Libertarian
"Natural Law" (new agers)
"Peace and Freedom" (socialists)
American Independent
When you register to vote, you pick on of these, or you can choose "Independent" (No party. Not to be confused with "American Independent", which is a party) or "Decline to State". Something like 1/3 of the population is independent, up quite a bit recently.
Usually, the total vote for all but the first two parties is somewhere between 5 and 10%. However, the press blackout of minor parties is so bad, that the media typically reports only the totals for the two parties.
As part of an earlier effort at "campaign finance reform", candidates get an extra dollar for every dollar they raise ("matching funds") assuming their party got more the somewhere between 5 and 15% of the vote. (I don't recall which, exactly.) Obviously this boosts the major parties and marginalizes the fringe parties. Also, the American public, for some unknown reason, only regards those candidates that the press annoints. In this election, they've annointed just four, and report as if there are only four men running, despite the fact that the sample ballot for the primary election coming up in California I just received has twenty people listed as running for President.
Anyway, this media blackout of minor candidates is mostly what causes the cash requirement. Unless you spend a fortune advertising, you won't get mentioned on the news.
Finally, in most elections, you actually have the right to vote for anyone who meets the eligibility requirements. A "write-in" candidacy. I could, for example, demand a write in ballot next november and vote for myself for president. (I'll turn 35 in August. Remember that, voters.) Write-ins are rare, but not unheard of. San Francisco had a well-publicized write-in candidacy that succeeded in forcing a run-off last year in its mayors race.
(Oh, and the "American Communist Party" still exists, as far as I know, but is so weak as to be a joke and has been since before WWII.)
"Software in the Public Interest, Inc"
on
Giving Back
·
· Score: 1
I assume these guys aren't at all affiliated with "Center for Science in the Public Interest", which mostly complains about nutritian labels, the amount of fat in restaurant food, etc.
They ought to be prepared for name confusion if they ever hit the press...
I'm really glad to see a corporate entity with somewhat of a soul.
Don't credit souls where they don't exist. People talk about the "megacorps" so much that they get the mistaken notion that they are a single entity, with one set of goals. Instead, they are a whole bunch of different entities, all with the goal of making money for themselves. This is what the MPAA wants and this is what Tesco's wants. However, the means for the one to make money may often conflict with the means for another to make money. When it happens, "megacorps" war. Perhaps one is in the "right" and one is in the "wrong" according to you, but that is just accidental. It no more shows morals, and is no more on your side than an alligator that pulls down the lion that was chasing you along the river.
Sounds good, but what I would have added is a $1 per e-mail fine for specifying a bogus "reply-to" address and $100 per e-mail fine for specifying a "reply-to" or "from" tag that is from a domain that you don't own. ($50 to go to the domain they improperly used and $50 for the agency that does the enforcement.)
That'd make it worth it to pursue these guys. With that kind of money on the line, you can bet that illegal spammers would get caught quick.
But anyway, the point I was trying to make is that just one version of Windows (Win98, say) is really just a collection of a whole bunch of stuff. A fair amount of the "os" is a set of COM objects that do various things. (IE being a prime example of this.) I can see Microsoft claiming to be "opening" to OS and yet leaving out so much of these that you don't end up with something functional. Sort of like having an open source Linux kernel but all the GNU tools closed source. Would there be any point of that.
Tell ex-President Carter. Castigated and shredded for the crime of being an honest politician and an acknowledged falliable human being. Truth didn't mean a whole lot to Americans, on voting day.
There are two problems with this. One is that it is far more likely that the lost election was due to the poor economy and Iran hostage crisis than Jimmy Carter's honesty. Secondly, far from being burned at the stake, he has become one of America's most honored former politicians.
Don't equate lost elections due to politics to people being burned at the stake for their views. it dishonors the latter.
Then, there's the mysterious case of a well-known TV chat-show host, who dared to suggest the American meat industry might have a non-zero level of BSE. A $60 million dollar lawsuit followed, for "damaging" the reputation of the industry.
Yes, and they lost that lawsuit completely and utterly. The well-known chat-show host remains one of the richest entertainers in America. (Hard to equate being utterly rich and spending a couple weeks in court to being burnt at the stake.)
Then, there are those who disagree with the "orthodox" religion of politics. Marx is not only hated by the US, but anyone associated with his views of power equality was, for many years, banned from the shores of the allegedly free US.
And yet the American Communist Party remains in existence, unbanned. Angela Davis is still unimprisoned.
But anyway, I sure as hell hope someone persecutes me until I'm as bad off as Oprah.
I'd say, only use it if you are willing and able to send something as well researched, reasoned, polite and informative as the the original above. Better to have ten comments such as that then 10,000 poorly thought out flames. We want the signal to get through. Only comment if you are an 'S', not if you are an 'N'.
But then, C++ is the only language (to my knowledge) that allows you to use safe arrays where you want them, and faster, unsafe arrays where you want them, without having to set compiler options that change everything globally:
int unsafe_array[10];
vector<int> safe_array;
This way, I can put a carefully tested unsafe array in that one tight loop that was eating up all the cpu while using safe arrays for virtually everything else.
Much of the problem isn't so much the lack of language features as it is with general ignorance about the availability of certain language features. Not enough people use the STL classes. Though I suppose that one could argue that the complexity of the language gaurantees this.
There is a reason why "academic" languages rarely make it out of acadamia. I remember the PC world in 1986. Pascal made it to the PC first. There is a reason that C became the language of choice on the PC rather than Pascal. It is because it is a practical language, not a language that follows what computer science professors think a language ought to do.
1) Read "The Design and Evolution of C++". It contains a lot of information on efficiency and C++.
2) You can write something that looks pretty much like C, but compiles under C++. You can then conservatively pull in C++ features that will help you. This can help you get over efficiency concerns.
Anyway, if you learn to write good C++ code, you'll find that it is nearly as fast and small as good C code. The idea that C++ is ineffecient usually comes from people who dive in and use lots of C++ constructs without understanding the costs.
He explicitly says that his worst mistake was not including enough basic library classes with the first releases. He's right. One of the biggest headaches has been the amount of time it took to get standard string, list, hash, etc. classes.
That's just because you have more time to read the manuals while waiting for your application to run.
COM = Component Object Model.
It is an inherently object-oriented technology so it should surprise no one that that it doesn't work well with a non object-oriented language.
Yes, this is in jest, though unfortunately the above is an all too real problem. One of the beauties of C++ is that you don't have to use all the cool OO features. Unfortunately, many poor C++ coders feel bound and determined to.
To answer your question, C++ can't really be more efficient than C because it is pretty much C with object-oriented extensions. But by the same token, it is fairly easy to write a C++ program that performs as well as a C one. Just be careful about the object oriented extensions you use.
Also, as a Windows programmer, I spend much of my time grappling with imperfect implementations and proprietary versions of classes. As an example, most Windows programs seem to use the Microsoft specific CString rather than the standard std::string operator for strings. This can cause problems because of the poor way Microsoft has implemented their versions of some of these classes. Is this a problem that will continue to plague us, or do you see all vendors moving towards better support for the standards instead of proprietary APIs?
BTW: In the Windows world, C++ has been used for systems programming for a few years now.
This sort of thing always amazes me. I once had to install Microsoft IE on a laptop that didn't have it (don't ask) and discovered that the only way I could do it was to first download Netscape using ftp, and then use that to download IE. Microsoft has an FTP site, but doesn't seem to bother to put newer versions of their software there.
Which is another huge pet-peeve of mine. As someone who does a lot of downloading over a telnet connection, it really ticks me off when people want you to use http to download software. Make a link to an ftp site!
What makes it particularly confusing is that many "crackers" call themselves "hackers", and reserve the term "cracker" for someone who "cracks" the copy protection on software.
Let me add a "hell, yeah!" to this. I'm still required to keep Windows running at home for various reasons, but use a Linux machine for fun. However, even if I never used the Linux machine directly, it'd still be damn useful. I now had DSL, but there is no way in hell I'd hook up my Win95 box to a direct connection. Now I've got a nice little firewall that took very little time to set up and cost nothing.
Also, Samba works damn well as a file-server. One of my problems on my Win95 box was the %$&$%@ 2 Gig partition limit. I could upgrade to Win98, but having upgrade Windows many times, I know the sort of pain that can cause one to endure. Easier was to install a new hard drive on the Linux machine, and create a nice big shareable partition on it.
Anyway, Samba works really, really well and if anyone were to ask me to recommend a good file/print server for Windows, I'd recommend a Linux box long before a Windows machine.
Actually, I think they are supposed to be non-profit. Though with either Gore or Bush, it is hard to tell.
If I recall correctly, "officially" running for president is merely a matter signing up with the FEC. This won't get you on the ballot, though. In that, the restrictions vary wildly by state. In some states, the restrictions are bad enough that only the two major parties get on. In others, pretty much any party who signs up gets on. In my state (California), we tend to have the following parties on the ballot:
When you register to vote, you pick on of these, or you can choose "Independent" (No party. Not to be confused with "American Independent", which is a party) or "Decline to State". Something like 1/3 of the population is independent, up quite a bit recently.
Usually, the total vote for all but the first two parties is somewhere between 5 and 10%. However, the press blackout of minor parties is so bad, that the media typically reports only the totals for the two parties.
As part of an earlier effort at "campaign finance reform", candidates get an extra dollar for every dollar they raise ("matching funds") assuming their party got more the somewhere between 5 and 15% of the vote. (I don't recall which, exactly.) Obviously this boosts the major parties and marginalizes the fringe parties. Also, the American public, for some unknown reason, only regards those candidates that the press annoints. In this election, they've annointed just four, and report as if there are only four men running, despite the fact that the sample ballot for the primary election coming up in California I just received has twenty people listed as running for President.
Anyway, this media blackout of minor candidates is mostly what causes the cash requirement. Unless you spend a fortune advertising, you won't get mentioned on the news.
Finally, in most elections, you actually have the right to vote for anyone who meets the eligibility requirements. A "write-in" candidacy. I could, for example, demand a write in ballot next november and vote for myself for president. (I'll turn 35 in August. Remember that, voters.) Write-ins are rare, but not unheard of. San Francisco had a well-publicized write-in candidacy that succeeded in forcing a run-off last year in its mayors race.
(Oh, and the "American Communist Party" still exists, as far as I know, but is so weak as to be a joke and has been since before WWII.)
They ought to be prepared for name confusion if they ever hit the press...
Don't credit souls where they don't exist. People talk about the "megacorps" so much that they get the mistaken notion that they are a single entity, with one set of goals. Instead, they are a whole bunch of different entities, all with the goal of making money for themselves. This is what the MPAA wants and this is what Tesco's wants. However, the means for the one to make money may often conflict with the means for another to make money. When it happens, "megacorps" war. Perhaps one is in the "right" and one is in the "wrong" according to you, but that is just accidental. It no more shows morals, and is no more on your side than an alligator that pulls down the lion that was chasing you along the river.
You can bet that at $10 an e-mail, and with spammers sending millions of them, the lawyers will be all over this.
Sounds good, but what I would have added is a $1 per e-mail fine for specifying a bogus "reply-to" address and $100 per e-mail fine for specifying a "reply-to" or "from" tag that is from a domain that you don't own. ($50 to go to the domain they improperly used and $50 for the agency that does the enforcement.)
That'd make it worth it to pursue these guys. With that kind of money on the line, you can bet that illegal spammers would get caught quick.
I agree about the moderation, actually
But anyway, the point I was trying to make is that just one version of Windows (Win98, say) is really just a collection of a whole bunch of stuff. A fair amount of the "os" is a set of COM objects that do various things. (IE being a prime example of this.) I can see Microsoft claiming to be "opening" to OS and yet leaving out so much of these that you don't end up with something functional. Sort of like having an open source Linux kernel but all the GNU tools closed source. Would there be any point of that.
Up until now, Microsoft has called everything the OS. Will this change? Will IE suddenly be merely an application?
More importantly, what about the dev tools? If "Windows" is open, but COM is not, this doesn't really mean much.
Uh....It wasn't a "him". It was Oprah. A quite famous "her" for those not in the states. And it was pretty much a media coup for her.
There are two problems with this. One is that it is far more likely that the lost election was due to the poor economy and Iran hostage crisis than Jimmy Carter's honesty. Secondly, far from being burned at the stake, he has become one of America's most honored former politicians.
Don't equate lost elections due to politics to people being burned at the stake for their views. it dishonors the latter.
Then, there's the mysterious case of a well-known TV chat-show host, who dared to suggest the American meat industry might have a non-zero level of BSE. A $60 million dollar lawsuit followed, for "damaging" the reputation of the industry.
Yes, and they lost that lawsuit completely and utterly. The well-known chat-show host remains one of the richest entertainers in America. (Hard to equate being utterly rich and spending a couple weeks in court to being burnt at the stake.)
Then, there are those who disagree with the "orthodox" religion of politics. Marx is not only hated by the US, but anyone associated with his views of power equality was, for many years, banned from the shores of the allegedly free US.
And yet the American Communist Party remains in existence, unbanned. Angela Davis is still unimprisoned.
But anyway, I sure as hell hope someone persecutes me until I'm as bad off as Oprah.
I'd say, only use it if you are willing and able to send something as well researched, reasoned, polite and informative as the the original above. Better to have ten comments such as that then 10,000 poorly thought out flames. We want the signal to get through. Only comment if you are an 'S', not if you are an 'N'.