Forum Discussion
TheEndless
11 years agoRoku Guru
"EnTerr" wrote:
Mmmm, good point.
I see roPath does ifString but who does ifInt (but roInt)?
As I mentioned earlier in this thread, there's at least one roXXXXEvent type that implements ifInt.
"EnTerr" wrote:
Personally per my Python exposure i am fan of "duck typing" ("if it walks like a duck and swims like a duck and quacks like a duck, i call that [type] a duck"). In other words if the type can perform the duties of a String, for all practical purposes it is a string. Which i can probably check if the value can/has ifStringOps, to be more precise.
I have some serialization methods that don't trust "duck typing" for obvious reasons. I also have some casting/conversion functions that need to know the real type.