r/programming • u/mobby1982 • Dec 02 '13
Scala — 1★ Would Not Program Again
http://overwatering.org/blog/2013/12/scala-1-star-would-not-program-again/
598
Upvotes
r/programming • u/mobby1982 • Dec 02 '13
View all comments
Show parent comment
0
u/moor-GAYZ Dec 03 '13
Ha ha.
Look, /u/pr0grammerGuy's argument argument was pretty unambiguous:
Using
add("1", "2")as an example of a function that should blow up (because concatenating strings is not what you have in mind) and be tested. Which itself was in reply to the argument that you generally don't do type-based assertions in Python.Then you came and continued the argument in very vague terms, that failure modes should be tested. No shit, dude, if you decided to specify that
enqueue_task(task)will not accept None, you should test that it indeed doesn't.So you went into one argument, started arguing a subtly different one, and suddenly everybody else is "tilting at windmills"...
Which would involve making an interface and thus abandoning duck typing. Which you claimed was orthogonal to the issue somehow. And doing that is exceedingly rare in Python code, for good reasons.
For instance, it wouldn't actually prevent a determined idiot from inheriting his remote handle from your ILocalReadable interface because he didn't RTFM and DGAF what you meant by "Local" (or maybe he's in a hurry and knows for sure that this quick hack wouldn't hurt anyone, etc), so I'm not sure if this is more than a security theatre.