Closed lkishalmi closed 5 months ago
(not sure about using var for collections by default, since types often matter but it is just a template)
@lkishalmi what would you think about also adding ilof
imof
and isof
?
(not sure about using var for collections by default, since types often matter but it is just a template)
Well, since the resulted collection is immutable, I do not think the type would really matter.
Personally I would mainly use them in education space, creating sort code for demonstration purposes, and yes they are just templates.
@lkishalmi what would you think about also adding
ilof
imof
andisof
?
Where i
would stand for?
i
for the interface on the left hand side.
ilof
would be List<|> list = List.of()
it might have to put the cursor between <>
first, since I am not quite sure how to automatically set the generics once the type is modified on the right hand side.
Could be done, I'd probably use llof
, mmof, and
ssoffor abbrevs.
isofis pretty close to the commonly used
iof`.
Also popped in my mind, that the List.copyOf()
, etc would be more common with records, and then records with compact constructor...
Some cheap new tricks for Java Wizards!