> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> Date: Wed, 6 Nov 2002 14:53:37 -0800
> From: Michael Lazzaro <[EMAIL PROTECTED]>
> X-SMTPD: qpsmtpd/0.12, http://develooper.com/code/qpsmtpd/
> 
> 
> If anyone knows the answer to these two questions, I'd appreciate it.
> 
> 1) What do these do?
> 
>     my int $n = 5;           # OK
>     my int $n = 5.005;       # trunc or err?

Trunc.  Int context, you know :)

>     my int $n = "5.05ff"     # 5, 0, undef, NaN, or exception?

If it's like Perl5, 5.05.  But there could be reason to make it an
exception.  Dunno on that one.  I would say 5.05 for now, until
someone with authority corrects it.

>     my int $n = "fdsjfdf"    # 0, undef, NaN, or exception?

Likewise here.  There could also be reason to have this behave
differently from the last one.  Though, I would say 0 for now.

> 
> 2) Do "num" and "int" share a common base "is a number" class, such 
> that (in perl5-ish speak) we can say
> 
>     if want(numeric) { ... }
> 
> to identify both, or is "num" the base class to test for, and "int" a 
> subclass?  (I'm pretty much assuming "bit" is a number too, but never 
> mind that now.)

I believe this was the plan.  Remember, there was int context and num
context, so a natural extension would be that conclusion.

As for your documentation plan, I think it's a good idea, though I
concur with Dan on Just Do It.  Document the language for what best
makes sense now.  If there are *big* issues, ask Larry et al. on this
list.  For the little ones, use common sense and they will be hashed
out later.

Luke

Reply via email to