From 735425716931778803
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,fb1a92fa405c930c,start
X-Google-Attributes: gidf78e5,public
From: gbush@my-deja.com
Subject: nested functions
Date: 1999/06/06
Message-ID: <7jd4c5$nup$1@nnrp1.deja.com>#1/1
X-Deja-AN: 486232593
Approved: Valentin Bonnard <bonnard@clipper.ens.fr>
X-Http-Proxy: 1.0 x41.deja.com:80 (Squid/1.1.22) for client 153.37.195.145
X-Original-Date: Sun, 06 Jun 1999 06:27:22 GMT
Organization: Deja.com - Share what you know. Learn what you don't.
X-Article-Creation-Date: Sun Jun 06 06:27:22 1999 GMT
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUAN1oV66wEuYhIxRhxAQGACgH/VgHvFa/axCtgKcMUpPuPxEB+z4ENz3gg 4kawB8oQXJRsSpEKCSJKvoVedJa6vYk3eeSwZ5rmTsqsdOW+SEVngw== =lBn4
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)
Newsgroups: comp.std.c++

C++ unlike other languages doesn't support nested functions. I
understand, bad heredity. But C++ had an opportunity to escape from
this predicament by allowing classes inside function body see the local
non-static variables, defined in the outer scope as well as function
parameters. For some reason it was not done. I wonder, is there at
least one good reason why it is so? (You see, I don't ask about five
good reasons anymore, just one.) I understand, certainly, that someone
could return object that contains references to local variables, but it
hardly can be considered a good reason.
Gene.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
---
[ 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              ]



