Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
chii
· 7y ago · 0 comments
i wonder if it's possible to generate type parameters such that computation is done with it at compile time?
Comments
[–]
saagarjha
7y ago
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
[–]
OskarS
7y ago
Theoretically, sure:
https://arxiv.org/pdf/1605.05274.pdf
[–]
JadeNB
7y ago
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.
[–]
erdeszt
7y ago
There's a Prolog in your Scala:
https://www.youtube.com/watch?v=iYCR2wzfdUs
It does compile time computations using generics + implicits
[–]
ygra
7y ago
https://arxiv.org/abs/1605.05274
perhaps?