cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

REPR for Namespaces

What inspired this wish list request? This is inspired because JMP classes have special REPR functions (_to string_ and _show_) that are quite nice.  I work with many namespaces that exist hierarchically -- as it, they refer to each other via child / parent relationships -- and if I accidentally cause one to be printed to the log then JMP will effectively crash as it attempts to write tens of billions of lines to the log (a few times I waited many hours to avoid lost work).

 

What is the improvement you would like to see? If namespaces had a REPR override then it would be very nice!  If I have either the name _show_ or _to string_ within the namespace, I'd like it to use those names just like classes use.

 

 

Why is this idea important? For me it is important because I use namespaces extensively, and primarily when errors are throws if I could easily print the current namespace and have it show a descriptive REPR that I've implemented that would be awesome, but mostly I don't want JMP to effectively crash when I accidentally print the raw namespace (again, because it circularly refers to many dozens / hundreds of other namespaces)

 

1 Comment
hogi
Level XII

@mia_stephens : new?