Boost logo

Boost :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2007-10-17 15:41:35


David Abrahams wrote:
> on Tue Oct 16 2007, "Marco Costalba" <mcostalba-AT-gmail.com> wrote:
>
>> I would like to ask you if someone has never dreamed of something like
>>
>> try well_formed
>> {
>>
>> .... your code here...
>>
>> } catch {
>>
>> .... fall back code in case former is not compilable...
>>
>> };
>>
>>
>> I would think this would be an extension that greatly will open new
>> gates to C++.

> 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.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk