Oh, sure, I'm new to Kotlin and still learning the...
# kontributors
j
Oh, sure, I'm new to Kotlin and still learning the standard library. It looks like I'd still have to inline reify the type in order to call filterIsInstance, and my intention is to keep childExpressions private, so I still need the gateway. Perhaps I should just make a public childExpressions iterable property and then expect my users to use the existing filterIsInstance
Copy code
private val _childExpressions = arrayListOf<Expression>()
    val childExpressions: Iterable<Expression> // EDIT: Or I could just return List<Expression>, my intention is to remove the mutability of _childExpressions
        get() {
            return this.childExpressions.asIterable() 
        }
Thanks for the tips. I didn't mean to get into the specifics of my code, though I suppose it's relevant in deciding what language features are actually valuable to add to Kotlin