Re:How Many Type Parameters Can a Java Method Have?
by chii on Monday April 29, 2019 @08:47AM
(#19777814)
i wonder if it's possible to generate type parameters such that computation is done with it at compile time?
[ Parent
| on HN ]
Re:How Many Type Parameters Can a Java Method Have?
by saagarjha on Monday April 29, 2019 @08:58AM
(#19777909)
Java’s generics are Turing complete, though I don’t think anyone has written a useful program in them yet: https://arxiv.org/pdf/1605.05274.pdf
Re:How Many Type Parameters Can a Java Method Have?
by OskarS on Monday April 29, 2019 @08:57AM
(#19777900)
Theoretically, sure: https://arxiv.org/pdf/1605.05274.pdf
Re:How Many Type Parameters Can a Java Method Have?
by JadeNB on Monday April 29, 2019 @03:43PM
(#19781898)
I think it's a good idea to link to abstracts https://arxiv.org/abs/1605.05274 (as ygra does (https://news.ycombinator.com/item?id=19777896 )) rather than directly to PDFs.
Re:How Many Type Parameters Can a Java Method Have?
by erdeszt on Monday April 29, 2019 @09:14AM
(#19778037)
There's a Prolog in your Scala: https://www.youtube.com/watch?v=iYCR2wzfdUs
It does compile time computations using generics + implicits
Re:How Many Type Parameters Can a Java Method Have?
by ygra on Monday April 29, 2019 @08:56AM
(#19777896)
https://arxiv.org/abs/1605.05274 perhaps?