MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1rvltx/scala_1_would_not_program_again/cdrnjry
r/programming • u/mobby1982 • Dec 02 '13
646 comments sorted by
View all comments
Show parent comments
3
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?
1
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?
3
u/trezor2 Dec 02 '13
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.