Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:80s all over again? (Score 1) 456

Python is strongly typed. It's also dynamically typed.

You can easily catch Python bugs analogously to how you would with a statically, manifestly typed language, using an IDE (or editor with plugins n- I like vim+syntastic), using a whole-program static analyzer (like pylint), using gradual typing (like mypy) and using automated tests.

Comment Re:Bug Conservation (Score 1) 456

I'm a big Python fan, but I can't stop looking enviously at Rust. It sounds pretty promising at catching bugs up front. I wish I could rewrite Python's innermost loops in Rust instead of Cython or C.

With appropriate software engineering tools, Python can do pretty well at catching bugs up front, but it sounds like Rust takes it to a whole other level: beyond pylint and mypy, beyond C++, beyond Java.

Comment Re:Bug Conservation (Score 1) 456

The earlier a bug is detected, the cheaper it is to fix, by orders of magnitude.

Agreed, but I'll point out that Python IDE's (or text editors with appropriate smarts like vim+syntastic), type inferencers (like pylint), gradual type systems (like mypy), and automated tests go a long way toward making it very cheap to catch Python bugs before deploying to test.

Combine that with the "fewer words per idea expressed" of Python, and you've got a winning combination.

Comment Re: You have to look at the source (Score 1) 456

Static typing is good for improving machine efficiency. It's also good for replacing the innermost loop of some Python programs.

Python's IDE's (PyCharm, vim+syntastic, emacs+I_bet_something_exists), type inference (pylint), gradual typing (mypy or pytype), and automated tests are more than adequate replacements for a static type system at catching bugs.

Comment Re:You have to look at the source (Score 1) 456

Compilation with a static type system need not be slow.

If anything, the analog with Python's implicit compile step (the interpreter itself), type inferencing (pylint), gradual typing (mypy), and automated tests is slower.

Developer time is more expensive than machine time in the modern world, and a VHLL like Python (plus a reasonable assortment of tools and techniques) is the best way to optimize developer time.

Comment Re:You have to look at the source (Score 1) 456

Strong typing is pretty useful, but it isn't the opposite of dynamic typing.

Strong typing just means that your language has few to no implicit type conversions. A 100% strongly typed language wouldn't even implicitly promote an int to a float.

Java allows you to add a number to a string; this is an small example of weak typing.

Python is kind of similar with multiplying a string by an integer.

Slashdot Top Deals

"The only way I can lose this election is if I'm caught in bed with a dead girl or a live boy." -- Louisiana governor Edwin Edwards

Working...