Compiler hints, inlining and syntax consistency

Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com> Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Sat Dec 28 03:49:30 PST 2013


On Saturday, 28 December 2013 at 11:42:58 UTC, bearophile wrote:
> A @warningonuse("some text") used for editors is just a 
> convention, it needs no language changes.

All compiler-hints are conventions: @assert(), 
@suppresswarnings{} etc. Compilers should be able to ignore all 
compiler hints they don't support without affecting a progam 
which is sound. ( @assert() should never be used to test input, 
only to assert that the logic is correct ).

It needs grammar-support if you want to avoid making comments 
"magic". It also needs compiler support if you want to support 
advanced IDEs or features such as 
compile-should-fail-on-any-warning.

Ola.


More information about the Digitalmars-d mailing list