Denis Derman <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #4 from Denis Derman <> 2011-02-15 14:40:59 PST 
(In reply to comment #0)
> The Clang front-end of LLVM tries harder to give good error messages:
> One simple but nice feature of its error messages is the usage of "aka", this
> is an example:
> t.c:13:9: error: member reference base type 'pid_t' (aka 'int') is not a
> structure or union
> This is a wrong D2 program: 
> void main() {
>     alias int Foo;
>     Foo f;
>     f = f.x;
> }
> DMD 2.049 prints:
> test.d(4): Error: no property 'x' for type 'int'
> But a more useful error message can be:
> test.d(4): Error: no property 'x' for type 'Foo' (aka 'int')

Agreed, would be very nive. Have no idea at which stage in the "decoding"
sequence name aliases are resoved, which certainly determines the difficulty of
implementing the feature.
Anyway, since D's term is 'alias', this term should be used in error messages
instead of 'aka'. Also, 'aka' can be difficult for non-english speakers (have
learnt it myself only recently, after decades of English practice). 'alias'
does not have this issue due to beeing part of D's terminology. However, it
goes in opposite sense, I guess:

test.d(4): Error: no property 'x' for type 'Foo' (alias for 'int')

Or maybe suppleness of English allows the following to be clear?

test.d(4): Error: no property 'x' for type 'Foo' ('int' alias)


Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to