[Issue 630] New: Obscure, unimplemented features related to in/out contracts

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 2 18:34:27 PST 2006


http://d.puremagic.com/issues/show_bug.cgi?id=630

           Summary: Obscure, unimplemented features related to in/out
                    contracts
           Product: D
           Version: 0.175
          Platform: All
               URL: http://www.digitalmars/com/d/dbc.html
        OS/Version: All
            Status: NEW
          Keywords: spec
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: smjg at iname.com
OtherBugsDependingO 511
             nThis:


Issue 302 talks of a long-unimplemented part of D: inheritance of in/out
contracts.  This is about some lesser-known DBC features that are in the D
spec.

"The compiler can be adjusted to verify that every in and inout parameter is
referenced in the in { }, and every out and inout parameter is referenced in
the out { }."

Admittedly, this seems pointless (leading to convoluted code just to use all
the variables), but it's there.

"The in-out statement can also be used inside a function, for example, it can
be used to check the results of a loop:"

There are workarounds for this, but that doesn't excuse anything.

I vaguely recall Walter mentioning an intention to remove these from the spec,
but nothing's happened about this either way.


-- 




More information about the Digitalmars-d-bugs mailing list