3 ms·
i wonder if it's possible to generate type parameters such that computation is done with it at compile time?
by chii 8y ago
i wonder if it's possible to generate type parameters such that computation is done with it at compile time?
- ygra 8y agohttps://arxiv.org/abs/1605.05274 https://arxiv.org/abs/1605.05274 perhaps?
- OskarS 8y agoTheoretically, sure: https://arxiv.org/pdf/1605.05274.pdf https://arxiv.org/pdf/1605.05274.pdf
- JadeNB 8y agoI think it's a good idea to link to abstracts https://arxiv.org/abs/1605.05274 https://arxiv.org/abs/1605.05274 (as ygra does (https://news.ycombinator.com/item?id=19777896 https://news.ycombinator.com/item?id=19777896 )) rather than directly to PDFs.
- saagarjha 8y agoJava’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 https://arxiv.org/pdf/1605.05274.pdf
- erdeszt 8y agoThere's a Prolog in your Scala: https://www.youtube.com/watch?v=iYCR2wzfdUs https://www.youtube.com/watch?v=iYCR2wzfdUs It does compile time computations using generics + implicits