From -5942403165984176024
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,a69618ea97f65037
X-Google-Attributes: gidf78e5,public
From: fake@email.address.net
Subject: Re: nested functions
Date: 1998/04/23
Message-ID: <jbk98hm400.fsf@pc0067.pica.nl>#1/1
X-Deja-AN: 348251339
Approved: stephen.clamage@sun.com (comp.std.c++)
References: <6hac23$8lb$1@news2.isdnet.net> <353b85b9.0@news.iprolink.ch>
Originator: clamage@taumet
X-NNTP-Posting-Host: pc0067.pica.nl
Organization: SURFnet BV
Newsgroups: comp.std.c++


"Didier Trosset-Moreau" <tmd@iprolink.fr> writes:

> Bjarne Stroustrup himself has explained that allowing them would generate
> lots of overhead in calls (if you think a little about the call mechanism,
> you'll reach the same problem very early). And decided to accept no overhead
> when designing C++.

Nested functions produce no overhead if you don't use them (just look
at the gcc implementation).  As such, they obey Bjarne's zero-overhead
rule, just like exceptions (which are in fact harder to implement in a
way that obeys this rule).

Regards,
Bas de Bakker
basde dot bakker at pica dot nl


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




