develooper Front page | perl.perl5.porters | Postings from October 1999

Re: A plea for Or-Defined: ordef, |||, |||=

Thread Previous | Thread Next
From:
wsnyder
Date:
October 1, 1999 18:36
Subject:
Re: A plea for Or-Defined: ordef, |||, |||=
Message ID:
199910020135.VAA25978@vulcan.maker.com
>We need one of the following:
>
>     use NameOfExtensionThatIDonTWantToMakeUpRightNow;
>
>     $a ??= $b;

Are you suggesting this is implemented in all perl code or in C?

Wouldn't in all perl require a way of overloading 'punctuational' operators
that don't exist?  (Well not exactly overloading as there's nothing
originally.)

One application would be a "Wire" class I am working on which handles
4-state values:

	if ($foo === $bar)
	if ($foo !== $bar)

The majority of Hardware types, the target audience, would recognise this
immediately as a operator from the Verilog Language.

The mess it would make in the tokenizer would be a real problem.  Yuck.

[BTW, Verilog has 4 state values one state of which is unknown -- basically
undef.  It also has operators that have special function on unknown, like
=== which works different from == only in its behavior with unknown.]

-Wilson

Thread Previous | 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