$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: AlisdairM (alisdair.meredith_at_[hidden])
Date: 2006-04-14 04:58:11
Andy Little wrote:
> Is the ability to define a function inside another a great win?. The
> only use is as an argument to functions that iterate through
> containers like std::for_each AFAICS.
I have certainly reached for them in other circumstances, to scope a
'helper function' as local to the code that needs it. Maybe it's my
Pascal background showing through, although I have not actively written
pascal for close to a decade now.
Usually when I reach for local functions it is purely a scoping
mechanism, and I have no interest in accessing local state of the
enclosing function. Accessing that state is what seems to bring the
complication, but also all the interesting use cases!
-- AlisdairM