"Justin Johansson" <n...@spam.com> wrote in message 
news:he768r$244...@digitalmars.com...
> Nick Sabalausky wrote:
>> 1. Floating point literals without digits on *both* sides!!! "1.", 
>> ".1" --> Useless hindrance to future language expansion!
>>
>
> On 1.  I understand you mean floating point literals without digits on 
> both sides of the decimal point should be disallowed.  On basis of this 
> understanding I beg to differ on grounds that this *should* be allowed for 
> future language expansion.
>
> Rationale: Whilst D is not currently XML aware (to any meaningful level of 
> standards compliance), the language may go that way in the future. 
> Therefore I would suggest that the lexical form of all literals in the 
> language should be aligned with, or at least include the lexical forms of, 
> literals as allowed by XML Schema Part 2: Datatypes Second Edition
>
> http://www.w3.org/TR/xmlschema-2/
>
> Specifically this does allow digits to be omitted from either size as per 
> the following lexical production:
>
> DoubleLiteral ::=
> (("." Digits) | (Digits ("." [0-9]*)?)) [eE] [+-]? Digits
>
> It is noted, of course, that D does provide the very programmer-friendly 
> mechanism of allowing underscores to used to separate digits in integer 
> literals.  Whilst integers with embedded underscores are not included in 
> the lexical space of integers as in cited XML Schema Datatypes, I do not 
> argue against them.  In other words, whatever D supports with respect to 
> the lexical forms of literals is fine so long as it *does not* preclude 
> lexical forms from XML Schema Datatypes.
>

I'm not sure I understand the usefulness of doing that, or what exactly you 
mean by a language being XML-aware. If you mean it would help translating 
some sort of special XML files into D code, then supporting those types of 
float literals from xml would be trivial to special-case. Or if you mean 
doing some sort of XML->D translation via XSLT: in my experience, I've found 
that XSLT is in general a very poor choice for anything other than XML->XML 
translations. Other than that, I don't understand the point...?


Reply via email to