DEV Community

Discussion on: Design By Contract, Immutability, Side Effects and Gulag

Collapse
 
eterps profile image
Erik Terpstra

Nice post! I'm relatively new to Nim, hadn't found out about the side effects tracking yet.
Also you state that 'the contract shields our code from the bug' but don't mention what happens at compile-time or runtime in the example (i.e. what is the error message you will get).

Collapse
 
juancarlospaco profile image
Juan Carlos

Vanilla assert error, as the DbC uses in general.
Maybe on the future it can self-document the contract using CommentStmt.