Does using a range in a boolean context instantiat...
# codingconventions
j
Does using a range in a boolean context instantiate an IntRange object, or is the compiler smart enough to avoid that?
e
as long as it is written like that (and not
val range = 1..12; return month in range
), then the compiler does not create the IntRange and produces code equivalent to the first
j
thanks!