5 ms·
Looks like no type aliases still? Does anyone know if type aliases are anywhere on the road map for Java? Is there some philosophical objection to them?
by haberman 6y ago
Looks like no type aliases still? Does anyone know if type aliases are anywhere on the road map for Java? Is there some philosophical objection to them?
- meddlepal 6y agoI do not believe they are on the roadmap at all.
- krzyk 6y agoWhat are aliases?
- uDontKnowMe 6y agoAs in Scala: // define a type alias type UserId = Long // can be used as a regular type val userId: UserId = 123L val userIds: List[UserId] = List(1L, 2L, 3L)
- noisy_boy 6y agoConsidering how heavily they have borrowed from Scala lately, I would have expected them to pick this up. I found them quite useful in Scala (and in Golang as well).
- brabel 6y agoJava is not borrowing from just Scala, it's borrowing from all languages and adding its all twists to things, just like Scala itself has always done (it's cleary inspired by Java itself, ML and Haskell, probably more).