[ ArgumentList ] vs. @( ArgumentList )

Sönke Ludwig sludwig at outerproduct.org
Sat Nov 10 03:45:46 PST 2012


Am 10.11.2012 11:21, schrieb Marco Leise:
> Am Fri, 09 Nov 2012 15:28:40 +0100
> schrieb deadalnix <deadalnix at gmail.com>:
> 
>> nothrow is already a keyword (which is really inconsistent). I'm not 
>> sure what it does buy us, and both safe and nothrow are good candidates 
>> for lib implementation rather than compiler support.
> 
> That requires that the compiler exposes all sorts of
> statistical data for every statement. E.g. to check if nothrow
> is violated you have to find statements that throw something
> and then check if there is a catch block around that, that
> catches it. If a statement is a function call, you would
> ask the compiler if that function throws. (In particular if it
> is a templated function with deduced 'nothrow' and '@safe').
> And there you are at the point that you just duplicated the
> compiler code in the library.
> 

Not duplicated, but moved - which results in a simpler compiler
implementation, definitely a good thing.

Of course those AST analytics/maccro functionality has to be added in
return, but since this has a much broader scope and would make other
features (string mixins) obsolete, even that is not quite clear in terms
of weight as a counter argument.

Anyway, I surely wouldn't expect this to happen anytime soon, but
keeping this path open seems like a wise decision - it's a great
opportunity to remove/not add features from/to the language without
trading functinality or even syntax.


More information about the Digitalmars-d mailing list