[sv-ec] Two simple proposals for discussion

From: Jonathan Bromley <jonathanbromley@ymail.com>
Date: Mon Feb 21 2011 - 14:11:41 PST

I've uploaded "draft A" proposals for 3001 and 3293. Please take a look.

Possible issues that you may wish to review:

- 3001:
I've settled for the "D::new" syntax for calling D's constructor, simply
because I like it better than "new D" which has a lexical ambiguity with
the copy constructor (and yes, I know it's an ambiguity that's
relatively easily resolved by tools, but I'm less sure about humans).
I've also sidestepped the task of writing BNF productions, until we get
consensus.

- 3293:
Tools currently differ in how they handle $cast when the source
expression is null. I've gone for making that unconditionally a
failure. I know that a literal null could reasonably be cast to any
class type, but I don't think a literal null is very useful as the
source expression for $cast so I preferred to avoid creating a special
case. I am pretty certain that it's correct to fail on any other null
expression, although not all tools currently agree with me.
I've tried to rewrite the text to be clearer, more consistent with the
rest of the LRM and less likely to need revision when interface classes
arrive. And I've dropped the mention of "singular" in the quasi-syntax
examples, because I couldn't see for the life of me what usefulness or
clarification it might bring.
I would have preferred to see the non-value-returning version of $cast
be specified as "function void" because it's not time-consuming, but
that would have made it inconsistent with many other system tasks.
The list of things in 10.8 (Assignment-like contexs) that are NOT
assignment-like contexts mysteriously mentions static casts but not
$cast, so I thought it prudent to mention that in the proposal.

Thanks

Jonathan Bromley

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Feb 21 14:12:19 2011

This archive was generated by hypermail 2.1.8 : Mon Feb 21 2011 - 14:12:32 PST