On Wed, Apr 20, 2005 at 08:20:04AM +0200, Leopold Toetsch wrote:
: I can't say anything about the actual Perl6 syntax, but Parrot provides
: sub-second resolution as well as alarm callbacks and of course multiple
: timers.

We will certainly be pushing all the time interfaces of Perl 6 toward
using floating-point time values.  The only question is whether alarm()
is the right name for one of the interfaces, and whether we even need an
interface whose *default* behavior is to send a signal, ugh.  We should
probably be encouraging timed callbacks instead.  We could even force
people to define their own alarm if they want one.  Assuming we
rehuffmanize "kill" to "sendsignal" or some such, we have:

    sub alarm ($secs) {
        { sendsignal $*PID, Signal::ALARM }.cue(:delay($secs));
    }

Though I suppose people really mostly just want something like

    sub alarm ($secs) {
        { sendsignal $*PID, Signal::ALARM }.delay($secs);
    }

The actual verb/adverb names are negotiable, but they need to handle
relative vs absolute times intuitively.  Different words have different
connotations in that regard.  "delay" is definitely relative, while
"after" tends toward absolute, though can be used relatively too.
"at" is definitely absolute time, but maybe too overloaded with
positional meanings.  "later" is unfortunately completely ambiguous.

By the way, I was tempted to make it "sendsig", but then I started
wondering what it would mean to send a sigil or a signature...

In any event (no pun intended), I've always wondered how it is you 
can "kill" a process with a SIGCONT.  As long as we're fixing everything
else, maybe we can fix Unix too.  :-)

Larry

Reply via email to