Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^7: solve cubic equations (Python)

by LanX (Archbishop)
on May 05, 2017 at 19:07 UTC ( #1189600=note: print w/replies, xml ) Need Help??


in reply to Re^6: solve cubic equations (Python)
in thread solve cubic equations

> But I don't see why there has to be a special operator devoted to integers.

To be spotted easily?

Look your explanation was better than mine, you're far more experienced than me with python, nevertheless you didn't see the error in the code.

Wasn't explicit is better than implicit a python slogan?

Anyway I like the many operators in Perl, what's lacking is optional explicit typing, to tune inner loops.

Strangely the parser already allows typing, for many years yet.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^8: solve cubic equations (Python)
by no_slogan (Deacon) on May 05, 2017 at 19:22 UTC
    ...you didn't see the error in the code.

    Touché. But this kind of thing is a stopped clock. It's only right twice a day, and the rest of the time you have to catch the error yourself.

    I just discovered use integer... it's been in core since the beginning of time, but for some reason I never noticed it before.

      > I just discovered use integer..

      Interesting, but I didn't mean that, Perl's parser allows typing

       my TYPE VARLIST

      See my

      But not much more was ever implemented.

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!

        Yes, I got that. I was looking at B::CC recently, and I was surprised to see that support for type attributes is still marked as DOES NOT WORK YET. The way you tell it that a variable is an int is to name it with _i at the end.
Re^8: solve cubic equations (Python)
by Anonymous Monk on May 05, 2017 at 20:49 UTC
    "nevertheless you didn't see the error in the code."

    Nobody cares. The Python version will always look sexier.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1189600]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2019-10-23 10:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?