Re:Generating a Java program with 90% less code
by dnautics on Wednesday December 04, 2019 @02:16PM
(#21705863)
Static typing can help with a lot of things but it can't fix this error:
[ Parent
| on HN ]
Re:Generating a Java program with 90% less code
by maxdamantus on Wednesday December 04, 2019 @02:51PM
(#21706199)
Actually, it kind of can:
https://tryidris.herokuapp.com/compile#YWRkIDogSW50IC0+IElud...
The above link refers to the following Idris code:
add : Int -> Int -> Int
add a b = a - b
addTest : add 4 5 = 9
addTest = Refl
Re:Generating a Java program with 90% less code
by reitzensteinm on Wednesday December 04, 2019 @03:02PM
(#21706320)
That unit test would be just as easily implemented with dynamic typing.