Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I especially like the ensure old syntax, https://docs.elementscompiler.com/Concepts/ClassContracts/

    ensure
      Count = old Count +1 
      : 'MyObject: Count logic error';
Never seen that before, but smartpascal also added it. Edit: blush, Bertrand Meyer introduced that already. Pretty


I find Bertrand Meyer's Effiel System very compelling. The design by contract methodology is baked into the language. I did try a DBC library [1] for Python but eventually gave up trying to build it into my work. Not because there is anything wrong with that library, but the extra syntax "mess" that results from the bolt on nature that the library provides to Python in order to work became too much for me in the end.

[1] https://github.com/Parquery/icontract




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: