Norman Feske writes 2016-01-25 07:52:10:
> welcome to the mailing list!

Thanks! (Though I haven't actually subscribed yet.
I just noticed your reply by looking at the archives.)

> > ... Why not pass a
> > capability to main ...?
>
> That is a good point. In fact, we are currently revisiting the API in
> this respect:
>
>  https://github.com/genodelabs/genode/issues/1832

Ah. Yes. Exactly: "In the spirit of capability-based security, let us
drop the global env."

I hope the hello-world example is updated to make use of explicit
access to the LOG session while you're at it.

> That said, we will maintain the side effect of a default output facility
> (printf, PDBG) for practical reasons. For debugging (the main purpose of
> those functions), it would be unbearable to always need to pass a
> reference to a LOG interface around.

Yes, such a practical expedient is common in the ocap APIs that I'm
familiar with; e.g.

   The safeScope now provides a println-like traceln function for
logging debugging output to the tracelog. This output is quoted using
email quoting syntax, to identify the fully-qualified name of the
module it came from.
   -- http://www.erights.org/download/0-9-1/highlights.html

But I guess I don't consider debugging/logging the main use of
printf(). Traditionally,
printf() (implicitly to stdout) creates the normal output of a
program, not any sort of debug info.

-- 
Dan Connolly
http://www.madmode.com/

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
genode-main mailing list
genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main

Reply via email to