On 2019-12-03 07:53:48 +0000, Ola Fosheim Grøstad said:

On Tuesday, 3 December 2019 at 02:57:13 UTC, Adam D. Ruppe wrote:
On Monday, 2 December 2019 at 22:31:08 UTC, Ola Fosheim Grøstad wrote:
Interesting, could be useful, but now you have to remember to add "in(false)".

Yeah, it is kinda tempting to propose a language change, where an override method does this by default if nothing else is specified. I think it would probably usually be the right thing to do, and then you'd opt into extending it all the way by doing `in(true)` instead.

Yes, I agree, if you forget to add a specification then it probably should have the same strictness as the superclass. That is what I would expect.

+1 having to add something explicit to get the superclass contract activated looks weired.

In large scale projects this will become a big problem as you can't assume that every developer knows about all the contracts of a superclass.

--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

  • interfaces and contracts -... Adam D. Ruppe via Digitalmars-d-announce
    • Re: interfaces and co... Ola Fosheim Grøstad via Digitalmars-d-announce
      • Re: interfaces an... Adam D. Ruppe via Digitalmars-d-announce
        • Re: interface... Ola Fosheim Grøstad via Digitalmars-d-announce
          • Re: inter... Robert M. Münch via Digitalmars-d-announce
            • Re: ... Adam D. Ruppe via Digitalmars-d-announce
              • ... Robert M. Münch via Digitalmars-d-announce
                • ... Adam D. Ruppe via Digitalmars-d-announce
                • ... Ola Fosheim Grøstad via Digitalmars-d-announce
                • ... Adam D. Ruppe via Digitalmars-d-announce
                • ... Ola Fosheim Grøstad via Digitalmars-d-announce
                • ... Ola Fosheim Grøstad via Digitalmars-d-announce
                • ... Adam D. Ruppe via Digitalmars-d-announce
                • ... Adam D. Ruppe via Digitalmars-d-announce
                • ... Ola Fosheim Grøstad via Digitalmars-d-announce

Reply via email to