News for hackers. Stuff that matters.
Re:Pyret: A new programming language from the creators of Ra... by eliben on Saturday November 09, 2013 @10:52AM (#6701917)
I'm not sure I like having tests in the same file with the code. In real code bases it's very common to just read the code, and cluttering that with huge swaths of unit-tests is counter-productive.

That said, Pyret appears to be aimed at education so this may make more sense.

Re:Pyret: A new programming language from the creators of Ra... by skrishnamurthi on Saturday November 09, 2013 @04:47PM (#6703411)
Then you can put your tests in a `check` block and move them elsewhere. You don't have to use `where` except when it makes sense.
Re:Pyret: A new programming language from the creators of Ra... by reeses on Sunday November 10, 2013 @03:05AM (#6705710)
This is bouncing against the perpetual "code as text" problem.

Put the tests and docs in with the code and you end up going into "scanning" mode. The actionable information density per character is lower.

Put the tests and docs outside the code and you (or that obnoxious guy who just changed > to >=) don't update the tests or the docs. In the worst case (cough functional web tests) people tend to disable the tests because it's too much work to get them to conform to the changes and everyone is on fire and babies are dying and this needs to be done in production now.