From: David Abrahams (dave_at_[hidden])
Date: 2007-10-19 11:23:37
on Thu Oct 18 2007, Rene Rivera <grafikrobot-AT-gmail.com> wrote:
> Feel free to ignore this as it might be going off-topic...
> David Abrahams wrote:
>> on Wed Oct 17 2007, Rene Rivera <grafikrobot-AT-gmail.com> wrote:
>>> David Abrahams wrote:
>>>> Yes, the compiler vendors have a really hard time seeing how such a
>>>> feature could be implemented. The problem is that they have data
>>>> structures such as symbol tables that are updated as code is parsed,
>>>> and there's no way to roll them back to the state they were in before
>>>> the try block if the code turns out to be ill-formed.
>>> OK, that has got to be one of the lamest excuses I've heard from
>>> compiler vendors so far. All the compilers I've written have had some
>>> form of stacked symbol tables for the sole point of implementing scopes.
>>> And this is just another scope use case.
>> No, it's not.
> I guess that depends on your definition of scope.
>> You have to be able to undo template instantiations and
>> other permanent state changes that can't be stacked.
> Template instantiations go into the symbol table, like everything else.
> What makes them different that they can't be undone? What other
> permanent state changes are there that don't involve the symbol table?
Maybe you should ask the implementors. I'm sure the EDG guys and the
GCC maintainers would be happy to explain it to you.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk