Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > Re: For the Win...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 6667 of 9938
Post > Topic >>

Re: For the Windoze haters - VS2005

by John Larkin <jjlarkin@[EMAIL PROTECTED] > Feb 20, 2006 at 06:36 PM

On 20 Feb 2006 05:33:40 -0500, "Greg Herlihy" <greghe@[EMAIL PROTECTED]
>
wrote:

>Rich Grise wrote:
>> On Sat, 18 Feb 2006 00:37:18 -0800, Le Chaud Lapin wrote:
>> ...
>> > expert who has participated in the standards process, Stan Lippman,
>> > called "Pure C++".
>> > (http://msdn.microsoft.com/msdnmag/issues/05/02/PureC/default.aspx)
The
>> > first thing you notice about the code written in this column is that
it
>> > is anything but pure C++.  Instead, there is .NET fecal matter
>>
>> I never got to anything like "C++"; this stopped me:
>>   " It sup****ts a static object model that is optimized for the speed
and
>>   size of its executables. However, it doesn't sup****t runtime
modification
>>   of the program other than heap allocation."
>>
>> Well, duh! That's kinda the _point_ of C++, isn't it?
>
>But C++ does allow program modification at compile-time, through
>programmatic code generation with templates. Extending that capability
>from compile-time to runtime would seem to be an obvious, and not
>particularly momentous, step. So the fact that C++ currently lacks
>runtime program modification I would view as a limitation of the
>current language - rather than to reflect a conscious design decision
>informed by some deeply-held, overaching philosophy. Moreover a
>philosophical basis for not sup****ting this feature would be completely
>moot. Since C++ has no underlying runtime with which to sup****t dynamic
>program modification, it's simply inconceivable that C++ could ever
>sup****t such a feature in a practical way. So any discussion about
>adding runtime program modification to C++ would - in almost all
>certainty - be no kind of a discussion at all.
>
>Now the word "limitation" in the paragraph above has a strictly neutral
>connotation. After all, this limitation may not be one that anyone who
>uses C++ has ever cared about. But by the same token, it is difficult
>to see how a limitation that some group of programmers do care about,
>is ever likely to be a net benefit for a programming language. After
>all there are at least some current language features in C++ (goto,
>macros, #defines come to mind) that are widely disdained by many C++
>programmers. Yet the fact that C++ does sup****t such unpopular language
>features probably does not deter large numbers of programmers from
>writing software in C++. And the explanation is simply that it is quite
>straightfoward to write a C++ program that simply avoids using these
>constructs. Likewise, even those adamently opposed to runtime program
>modification as a practice, could simply refrain from modifying their
>program at runtime were C++ suddenly (and somewhat magically) able to
>sup****t such behavior.
>
>And for the benefit of anyone who has dreamt of using runtime program
>modification in C++, it is certainly legitimate to point out that
>C++/CLI has such sup****t and that C++ does not. It would be extremely
>difficult for C++ advocates to criticize such language feature
>comparisons, precisely because one of the more effective (and quite
>legitimate) selling points used for years to promote C++ over C as a
>better programming language, has been to enumerate all of the language
>features that C++ sup****ts and which C does not.


C++ is complex and obscure enough already without adding runtime code
modification. Programming should be about producing reliable programs,
not playing complex mental games and poli****ng resumes.

But more im****tantly, the astoni****ng virus sensitivity of Windows is
largely due to the stack orientation of C-style languages combined
with the lack if I/D space separation. Code and data are so mixed up
that a stack overflow almost always pokes a hole into executable code,
and Microsoft is helpless to prevent it. The Windows attitude is "when
in doubt, execute it" when it should be "when in doubt, trap it."

Even a PDP-11 understood that code segments should be read-only, and
data segments should be unexecutable, and that code, data, and stack
should be in totally disjoint spaces.

None of my ROM-based embedded systems have ever had a virus.


John



      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 1 Posts in Topic:
Re: For the Windoze haters - VS2005
John Larkin <jjlarkin  2006-02-20 18:36:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Aug 27 21:17:37 CDT 2008.