Do you know where your variables are? PerlMonks

### Re^3: Incrementing "Infinity" bug (numification, perlnumber, magic increment decrement)

 on Mar 25, 2013 at 07:17 UTC ( #1025237=note: print w/replies, xml ) Need Help??

It's a bug or at least a design flow.

How do you figure? I think it isn't

So why doesn't Perl do this per default?

You know why, tradition (backwards compatibility ). "barewords" have always been strings

Also style, lowercase constants are unbecoming :p

do we really need to use hacks like 1e9999 to create inf?

We never needed that, use  0+'inf' or  int '-inf' ...

But hey, one of the math modules could export ... or even  use feature 'infinity'; could happen though I don't see the benefit, but what do I know

$perl -le " for(1..4){ print for \int 'infinity', \int'-infinity' } +" SCALAR(0x99bc74) SCALAR(0x99bc64) SCALAR(0x99bc74) SCALAR(0x99bc64) SCALAR(0x99bc74) SCALAR(0x99bc64) SCALAR(0x99bc74) SCALAR(0x99bc64) [download] update: nans, infs, and vomit, How to create nan/inf says bigint/bigrat export inf that stringifies to inf • Comment on Re^3: Incrementing "Infinity" bug (numification, perlnumber, magic increment decrement) • Select or Download Code Replies are listed 'Best First'. Re^4: Incrementing "Infinity" bug (numification, perlnumber, magic increment decrement) by LanX (Cardinal) on Mar 25, 2013 at 12:33 UTC > We never needed that, I showed a use case producing short, self-explanatory code with the use of inf. > use 0+inf or int '-inf' ... sure, why not introducing one more level of cryptic workarounds to justify perl's reputation of a line-noise-language instead of having self explanatory constants? > update: well ... no comment on the fact of an AnoMonk who can update his nodes ...;-) Cheers Rolf ( addicted to the Perl Programming Language) > We never needed that, I showed a use case producing short, self-explanatory code with the use of inf. But what has that got to do with the whack/hack 1e9999 ? $ perl -le " print for 1 .. 0+'Inf'"
Range iterator outside integer range at -e line 1.
[download]

sure, why not introducing one more level of cryptic workarounds to justify perl's reputation of a line-noise-language instead of having self explanatory constants?

you know, I linked to the docs, the explanation, and the inf constant exporters (bigrat/bigint )

perl is fundamentally what it is, and it works the way it has for over a decade, if you don't like it, don't use it; calling it line-noise and cryptic at every turn is uninspired and uninteresting

update:

well ... no comment on the fact of an AnoMonk who can update his nodes ...;-)

Boring :/

> perl is fundamentally what it is, and it works the way it has for over a decade, if you don't like it, don't use it; calling it line-noise and cryptic at every turn is uninspired and uninteresting

good arguments for Perl 4.

Cheers Rolf

( addicted to the Perl Programming Language)

Create A New User
Node Status?
node history
Node Type: note [id://1025237]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2020-10-22 21:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
My favourite web site is:

Results (230 votes). Check out past polls.

Notices?