|
Archives
D Programming
digitalmars.Ddigitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger D.gnu D C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D.learn - Design by Contract - some questions
Hi there, I am doing a master thesis on Design by Contract, and as part of it, I am doing a survey on DbC solutions. I have found the D programming language very interesting, and one of the few real attempts to bring DbC to mainstream programming. After reading the site documentation, there are a couple of questions that I have, that you might be able to answer, namely: * is it possible to specify pre/postconditions in constructors and private methods? * is it possible to declare local variables within the 'in', 'out' or 'invariant' scope? * is there any concurrency insurance in contract execution (if the method is declared as 'synchronized', will the contract also be thread-safe)? Regarding the D authors' design options, I also have some questions: * has the 'old' construct been considered? * have interface contracts been considered (since D does not support multiple-inheritance)? * has (automatic) documentation generation support for contracts been considered? * has a finer grain of checking been considered, other that development/on and release/off (the ability to specify that contract checking for specific classes and/or specific assertion types)? Thank you for your time, Sérgio Agostinho Jan 27 2007
Reply to Sérgio_Agostinho,* is it possible to specify pre/postconditions in constructors and private methods? Jan 27 2007
|