Better write a test or a comment for a given method? Was: Re: Two Squeak-related bugs and three questions

Klaus D. Witzel klaus.witzel at cobss.com
Fri Jun 16 07:15:06 UTC 2006


On Thu, 15 Jun 2006 21:20:45 +0200, Markus Gaelli wrote:

> If there were a discussion to introduce a "documentation space" shown  
> next to a given method to document it (as it is the case for classes  
> right now) I'd strongly argue to use it for tests -- and not for  
> comments.

+1

One could even go further and design new syntax elements (vs. properties  
unknown to the compiler) for attaching tests to methods, so reflecting the  
importance of tests.

In a not so distant future, perhaps, the compiler would only accept code  
if all the tests which are attached to the input pass (this scenario would  
include the case where a method change makes a test fail) who knows :)

/Klaus

> Cheers,
>
> Markus
>
>
>





More information about the Squeak-dev mailing list