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++ > Re: C++ more ef...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 44576 of 48417
Post > Topic >>

Re: C++ more efficient than C?

by Nick Keighley <nick_keighley_nospam@[EMAIL PROTECTED] > Apr 10, 2008 at 03:13 AM

On 10 Apr, 10:00, Kelsey Bjarnason <kbjarna...@[EMAIL PROTECTED]
> wrote:
> On Tue, 08 Apr 2008 13:38:21 -0700, Keith Thompson wrote:

> > I'll just point out that there are plenty of programming languages in
> > which functions (procedures, subprograms, whatever) can modify their
> > arguments, and programmers who use those languages generally manage to
> > cope with the pain.
>
> Sure. =A0C's one such language, but at least in C, there's generally
> something visible at point of call that indicates this, such as the item
> being passed is already a pointer and thus at potential risk of having
> the data pointed at modified, or the presence of an & to indicate a
> pointer is being created, the entire reason for which, generally, is to
> have the data modified.
>
> Yes, one certainly _can_ work around this particular design flaw of C++
-
> and other languages as you note - but IMO one should not have to; the
> fewer impediments to programmer comprehension of the code, the better.

I nearly wrote a post like Keith's, but he beat me to it.
So I'll do a "me too" instead.

It is *not* a design flaw of C++.
By now I'm used to C's lack of a proper call-by-reference
but it sure looked broken the first time I saw it.

I was raised on Alogol-60 (ok that's call-by-name...), Fortran
and Pascal. C is the weird one!


--
Nick Keighley
 




 1 Posts in Topic:
Re: C++ more efficient than C?
Nick Keighley <nick_ke  2008-04-10 03:13:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Sat Nov 22 2:52:44 CST 2008.