Most active commenters
  • koakuma-chan(3)

←back to thread

517 points bkolobara | 16 comments | | HN request time: 0.006s | source | bottom
Show context
koakuma-chan ◴[] No.45041723[source]
I encourage every one to at least stop writing code in Python.
replies(5): >>45041794 #>>45041941 #>>45042073 #>>45043031 #>>45049992 #
veber-alex ◴[] No.45041941[source]
Here is some actual useful advice:

Use a type checker! Pyright can get you like 80% of Rust's type safety.

replies(7): >>45042031 #>>45042063 #>>45042147 #>>45042269 #>>45043223 #>>45047269 #>>45050186 #
1. koakuma-chan ◴[] No.45042031[source]
I don't agree that Python can be saved by a type checker. The language itself is flawed irreversibly, as well as its ecosystem. It's a big big mess. Can't build reliable software in Python.
replies(5): >>45042142 #>>45042151 #>>45042254 #>>45042267 #>>45047827 #
2. dkdcio ◴[] No.45042142[source]
you can and this is a juvenile position. there is reliable software in any language as popular and widespread as Python. every language is flawed
replies(1): >>45053881 #
3. grep_it ◴[] No.45042151[source]
Is this rage-bait? A language alone doesn't dictate reliability. There are tons of large scale systems out there running on Python. As for the language being, "flawed irreversibly", I'd be curious to hear you expand on that with examples.
replies(2): >>45043132 #>>45053870 #
4. ◴[] No.45042254[source]
5. ninetyninenine ◴[] No.45042267[source]
It can't be 100% saved, but like the OP said it's 80% saved.

It's not true you can't build reliable software in python. People have. There's proof of it everywhere. Tons of examples of reliable software written in python which is not the safest language.

I think the real thing here is more of a skill issue. You don't know how to build reliable software in a language that doesn't have full type coverage. That's just your lack of ability.

I'm not trying to be insulting here. Just stating the logic:

   A. You claim python can't build reliable software.
   B. Reliable Software for python actually exists, therefore your claim is incorrect
   C. You therefore must not have experience with building any software with python and must have your hand held and be baby-sitted by rusts type checker.
Just spitting facts.
replies(1): >>45042484 #
6. koakuma-chan ◴[] No.45042484[source]
If you know some secret behind building reliable software in a programming language without types, with nulls, and with runtime exceptions, I'm all ears. I admit that a blanket statement "can't build reliable software" is going overboard, but the intention was to be dramatic, not factually correct. You can probably build reliable software in Python if you write everything from scratch, but I wouldn't want to do that to myself. I would rather use a programming language that has a type system, etc, and a better cultured ecosystem.
replies(1): >>45043515 #
7. nicce ◴[] No.45043132[source]
All programming languages are Turing complete and you can arque with that. But you reach similar results with varying pre-knowledge and effort. Sometimes it is even impossible. All programs can be bug-free but most are not, if we reverse the argument.
8. ninetyninenine ◴[] No.45043515{3}[source]
I prefer types too.

But I can build reliable software without types as well. Many people can. This isn’t secret stuff that only I can do. There are thousands and thousands of reliable software built on Python, ruby and JavaScript.

replies(1): >>45047838 #
9. dangus ◴[] No.45047827[source]
lol, Instagram is written in Python.
replies(1): >>45058679 #
10. mixmastamyk ◴[] No.45047838{4}[source]
Indeed, I write very reliable Python every day. A lot faster than the Rust straitjacket too.

We had sentry installed so I know exactly how many exceptions were happening, rare to zero. Lots of tests/constraints on the database as well.

That said I like a nice tight straitjacket at other times. Just not every day. ;-).

P.S. Python doesn’t have the billion-dollar-mistake with nulls. You have to purposely set a variable to None.

replies(1): >>45049395 #
11. ironlenny ◴[] No.45049395{5}[source]
OP was needlessly combative. But, if I have to write a program that is correct (i.e. does what I want it do to), I'm going to write it in Rust. Not because you cannot write correct programs in Python. But because it's easier to prove it's correct in Rust.

As a solo dev, I find that I start off in Python, but at a certain project size I find it too unwieldy to manage (i.e. make changes without breaking things) and that's when I implement part or all of the project in Rust.

replies(1): >>45054170 #
12. IshKebab ◴[] No.45053870[source]
> A language alone doesn't dictate reliability.

Nobody would claim that. But are you trying to say that the language has no effect on reliability? Because that's obviously nonsense.

Language choice has some effect on reliability, and I would say Python's effect is mediocre-to-bad. Depending on if you use Pyright. Not too bad if you do. Pretty awful if you don't.

13. IshKebab ◴[] No.45053881[source]
> every language is flawed

But not equally flawed.

https://www.lesswrong.com/posts/dLJv2CoRCgeC2mPgj/the-fallac...

14. mixmastamyk ◴[] No.45054170{6}[source]
> have to write a program that is correct

Yes, exactly. It doesn’t happen that often, but it does.

And folks have forgotten, not sure why, but Python was always billed as a prototyping language in the “olden tymes.” Or even “executable pseudocode.” At those it excels.

15. super_flanker ◴[] No.45058679[source]
What exactly? I work at Instagram.
replies(1): >>45068664 #
16. dangus ◴[] No.45068664{3}[source]
I don’t work at Instagram so I can only go off of what I found online: https://www.pythonpool.com/how-instagram-is-using-django-and...

https://python.plainenglish.io/how-instagram-uses-python-sca...