develooper Front page | perl.perl6.language | Postings from February 2005

Some quick questions.

Thread Next
From:
Autrijus Tang
Date:
February 4, 2005 12:44
Subject:
Some quick questions.
Message ID:
20050204204441.GB56444@aut.dyndns.org
Today I have finished implementing 90% of primitive operators; Pugs can
now evaluate most simple expressions, including junctive autothreading
and magical/infinite ranges.  Their implementation are in:

    http://wagner.elixus.org/~autrijus/darcs/pugs/Prim.hs

As such, there are some corner cases I couldn't find in the spec; please
correct me if my treatment is wrong:

* What is the value of a pair in numeric context? in string context?

    Currently I'm taking the ".value" part as its value.

* What is the value of a reference in any of the scalar contexts?

    Currently I'm blindly dereferencing it.

* How many bits are "+^" operating on?

    Currently it is using a native Unsigned Int.

* Does "**" flatten recursively?

    Currently it only flattens the first level of the list.

* Does "(3&0) and (4|0)" evaluate to "(3&0)" or "False"?

    Currently it evaluates to "(3&0)".

Thanks,
/Autrijus/


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About