invisible

R has a function called invisible. Cool, I’ve never seen a language with that before. As far as I can tell this must place the object into a set that is then ignored by the printing machinery. I’m guessing that this set is cleared when ever the read/eval/print loop comes around for another bite to eat. … hm, looks like only the top level of the printing machinery cares.

> 1;2;invisible(3);invisible(4);5
[1] 1
[1] 2
[1] 5
>

Most of the GUI systems I’ve worked on had an invisible predicate used by the rendering mechanism. You need it first to keep from spending huge amounts of time rendering things too small to be seen. Once you have it you start using it give your views an attitude. Sending a message to the read/eval/print loop as to what to do the result being computed; I don’t think I’ve ever seen that before. Interesting idea.

Leave a Reply

Your email address will not be published.