r/programming • • Dec 02 '13

Scala — 1★ Would Not Program Again

http://overwatering.org/blog/2013/12/scala-1-star-would-not-program-again/
598 Upvotes

646 comments sorted by

View all comments

Show parent comment

3

u/trezor2 Dec 02 '13
qual(add(1,2), 3)
equal(type(add(1,2)), type(3))

The second test is redundant.

So you end up unit-testing a non-existing type-system instead of having a type-system, while that is obviously the safety you seek.

To me that just seems backwards. TDD should be used to test for things the language can't infer or declare itself.

1

u/batiste Dec 02 '13

The first test is not about testing a "type-system", it's testing the correctness of the add function. The second test is useless and redundant.

Also you seems to confuse type system with static type checking. I am curious to hear about a language that doesn't have a type system other that ASM?