CARVIEW |
Select Language
HTTP/2 200
cache-control: max-age=43200
server: Combust/Plack (Perl)
vary: Accept-Encoding
content-encoding: gzip
content-length: 1779
content-type: text/html; charset=utf-8
last-modified: Wed, 15 Oct 2025 01:08:16 GMT
traceparent: 00931ca64140fe9efce9d2a366dfe7d9
strict-transport-security: max-age=15768000
Re: [perl #123466] Overloading for number-specific bitwise ops - nntp.perl.org
Front page | perl.perl5.porters |
Postings from January 2015
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About

Re: [perl #123466] Overloading for number-specific bitwise ops
Thread Previous | Thread NextFrom:
Father Chrysostomos via RTDate:
January 9, 2015 06:25Subject:
Re: [perl #123466] Overloading for number-specific bitwise opsMessage ID:
rt-4.0.18-26998-1420784697-531.123466-15-0@perl.orgOn Mon Jan 05 22:02:36 2015, aristotle wrote: > * Father Chrysostomos via RT <perlbug-followup@perl.org> [2015-01-04 23:45]: > > Does anybody currently overload & | ^ ~ for non-numeric uses? The > > only use of these I am aware of is by modules like Math::BigInt, etc. > > I’ve seen | overloaded to mean a shell pipe between process objects. > > I’ve seen & overloaded for something that likewise had nothing to do > with bitwise logic, though what it was escapes me. > > You cannot avoid calling these overloads. > > Maybe overloads of the numeric bitwise ops would receive a new fourth > argument which is true for a purely-numeric bitwise op and false for > a mixed-mode op? Instead of sending the caller out to fuss about with > hints in order to find that information, you just give it to them. No? Most overload handlers get passed 3 arguments. nomethod handlers are passed four, the fourth being the operator in question. For & do we pass a boolean as a 4th or 5th argument indicating numericalness depending on whether it is a nomethod handler? Or do we make it always the 5th argument? -- Father Chrysostomos --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=123466Thread Previous | Thread Next
- [perl #123466] Overloading for number-specific bitwise ops by Father Chrysostomos via RT
- Re: [perl #123466] Overloading for number-specific bitwise ops by Aristotle Pagaltzis
- Re: [perl #123466] Overloading for number-specific bitwise ops by Father Chrysostomos via RT
- Re: [perl #123466] Overloading for number-specific bitwise ops by Ricardo Signes
- Re: [perl #123466] Overloading for number-specific bitwise ops by Aristotle Pagaltzis
- Re: [perl #123466] Overloading for number-specific bitwise ops by Ricardo Signes
- Re: [perl #123466] Overloading for number-specific bitwise ops by Father Chrysostomos via RT
- Re: [perl #123466] Overloading for number-specific bitwise ops by Ricardo Signes
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About