¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: [TDD] More Typing, Less Testing: TDD with Static Types


 

¿ªÔÆÌåÓý

Hi Josue,

On Dec 17, 2014, at 7:14 AM, Josue Barbosa dos Santos josuesantos@... [testdrivendevelopment] <testdrivendevelopment@...> wrote:

I found this blog posts about TDD and typing. The first is a introduction and the second is an example using the same example in the book of Kent Beck (Test Driven Development by Example).?

The author claim that thinking int the types first leads to a better code than the pure use of TDD as did by Kent in the book.

More Typing, Less Testing: TDD with Static Types, Part 1

More Typing, Less Testing: TDD with Static Types, Part 2

Any thoughts?

The articles are interesting and deserve due consideration.

The code may be better: it¡¯s largely a matter of taste.?

If I wanted to write an article showing that my approach was better than Kent¡¯s, I¡¯d just work until my code was clearly better, no matter how long it took, then claim that it was my approach that made it work. I¡¯m not saying the author did that: I¡¯m saying that it would be a good way to ¡°show¡± that one method works better.

Certainly one does a different level and style of testing in a language with static types than in one without. Also one types a lot of redundant type-related information. The trade-off is not clear.

Personally, I do not find that doing ¡°less typing¡± makes my code better, nor that it lets me go faster. I seem to be limited by my ability to think. I suppose if I were smarter than I am, my typing might slow me down, but I think for most of us, ¡°less typing¡± shouldn¡¯t be a high priority.

Again, the articles are interesting and deserve due attention and thought. Then, readers should try the various approaches and find out what works best for them.

Regards,

Ron Jeffries
I'm not bad, I'm just drawn that way. ?-- Jessica Rabbit

Join [email protected] to automatically receive all group messages.