Forum Discussion
Komag
11 years agoRoku Guru
"RokuMarkn" wrote:
I'd tentatively suggest the code should be redesigned if you need to check things like that. Perhaps there's a good use case for keeping different types in the same variable but offhand I can't think of one. I certainly have never had the need to check types at run time, except to distinguish messages returned from Wait().
--Mark
You are likely right, I'm still a programming beginner and haven't the experience to really know all my "best practices". I may be able to rework some things to avoid some or all of these Type checks.
But I dunno, they're awfully handy at times. Sometimes I'll have multiple things that will call the same Function, but depending on what it is, one thing sends a certain variable (as dynamic) as a Boolean and the other sends it as a String, and that Function handles the variable differently depending on the Type.