So I think I answered my own first question. The f...
# announcements
h
So I think I answered my own first question. The functionality can be implemented and made into a library, but the syntax cannot be. It'd have to be a PR to the compiler that kotlin team accepted, or something?
e
You can have
var x by setOf(1,2,3)
syntax
h
as in to implement the features, or does that delegation functionality already exist?
set notation definitely wouldn't show up before collection literals show up... if ever!
e
As in you can easily implement it in your code so that this syntax works
h
cool. i'll work on it!
do you think
var x in setOf(1,2,3)
would work too?
i know i can transform
setOf()
into
CO{}, OO{}, CC{}, OC{}
also.. for closed and open respectfully
for use in interval notation, i mean
of course it would look so much nicer as
[x,y)
,
(x,y)
,
[x,y]
,
(x,y]