Re:Scala – 1 Star – Would Not Program Again
by chrismonsanto on Sunday December 01, 2013 @06:47PM
(#6830089)
It depends. In the most general case, you have to prove that the program you have given has the type you have asserted. This is similar to proving a mathematical theorem. Generally, the computer will assist you in this endeavor--for example, if you want to prove that A implies B, and A and B are linear inequalities, this can be solved automatically.
[ Parent
| on HN ]
Re:Scala – 1 Star – Would Not Program Again
by Locke1689 on Sunday December 01, 2013 @06:57PM
(#6830137)
Generally, the computer will assist you in this endeavor
Kinda. Let's be honest: in production this often turns into a pain in the ass. There's some value in dependent typing, but providing evidence that concatenating UTF-8 strings is associative is not one of them.
Re:Scala – 1 Star – Would Not Program Again
by chrismonsanto on Sunday December 01, 2013 @07:17PM
(#6830222)
I have faith that this will get better. We need standard libraries of proofs just as much as we need standard libraries of code. I know Coq has made progress on this, but it's still early days.
I do agree with you that there are times when 'full' type checking is inappropriate. Typing is a spectrum, and it's a bit of an art to decide how detailed of guarantees to give for your API.
Re:Scala – 1 Star – Would Not Program Again
by bootily on Sunday December 01, 2013 @07:19PM
(#6830236)
That is hilarious. And I also hope your joking.
Re:Scala – 1 Star – Would Not Program Again
by chrismonsanto on Sunday December 01, 2013 @07:26PM
(#6830264)
That user is not joking, but note that you generally prove that string concatenation is associative once, not every time.