I have a type that contains references to other instances of the same type 
- like a doubly linked list or - as it's intended use, like a tree like 
structure. They contain references to a parent of the same types and an 
array of references to children of the same type. However a root or singly 
constructed instance of the type will not start out with a parent or 
children and so these fields will be #undef, how can I check for #undef 
fields? It didn't say in the types section in the manual, although it did 
say accessing it is an automatic error so I guess a try block might work - 
but I don't know if try blocks are preferable in Julia to simply 
anticipating the #undef. I've normally heard the mantra of anticipating an 
expected exception rather than make excessive try catches.

Thanks. 

Reply via email to