93

Code never lies..

Comments
  • 2
    this is so true!

    no comments is always better than wrong comments!
  • 1
    Some people's comments are so misguiding.. You prefer reading the code..
  • 6
    In Rust, you actually write assertions as part of the documentation. That way you're guaranteed that the documentation always stays up to date.

    If someone changes the behaviour of the code without updating the documentation, your test suite will start to fail.
  • 2
    @Grundeir reason #265258 why Rust is awesome
  • 1
    This is why I practice TDD, my tests TEL you how this should work. Which sounds like Rust has the concept baked, am I understanding right?
  • 2
    @snypenet while I agree that TDD is awesome and tests are important, I don't believe they can be a substitute for having documentation.

    I think you're indeed understanding correctly: in Rust, assertions are baked into documentation. (One caveat: it is possible to write docs without assertions, a bad programmer can still screw it up, as with any other language.)
  • 1
    @Grundeir I don't agree that tests couldn't replace documentation because gherkin provides a great higher level syntax for business or anyone to describe functionality and then create step definitions that execute that spec.

    That's pretty cool. I might need to try rust.
  • 1
    //I never lie
Add Comment