Live data from Hacker News

Python Is Eating the World

zdnet.com

681–690 of 993 posts

Re: Python Is Eating the World

#681

Earlier quoted context omitted.

For what it's worth, Java tortures me a lot less since J8. I don't dread it the way I do python because I can use Clojure or Kotlin.

So the workplaces you've been at don't even let you change the line length limit, but they let you mix Clojure or Kotlin into a Java codebase?

Ah, no when I ran my own company I decreed it was a Clojure shop.

Re: Python Is Eating the World

#682

Earlier quoted context omitted.

People here are just very dramatic. I think I need to not read (or write) HN comments for a long time, there is some serious distorted reality about.

It is inexcusable how dramatic people are on HN.

I see you've never been to Reddit.

Re: Python Is Eating the World

#683

Earlier quoted context omitted.

What I find worse about Python than other languages is the lack of tooling and a relatively small collection of libs - many of which are half way done. In a last assignment, we decided Python is at most a hobby language. Python is great for machine learning because most research was conducting using this language, and as such, tooling is available. I would use it at most as an API exposing ML but that's pretty much i…

> In a last assignment, we decided Python is at most a hobby language. I don't know if you are just trolling, but this is the silliest, most detached from reality thing I've read online today. Python was key in building numerous massive public companies like Instagram and Dropbox. It's one of the most popular and widely used programming languages on the planet for everything from APIs to desktop clients to data pipel…

It appears tho the right tool for the task at hand, as a codebase grows, is NOT Python. A good starting point for someone fresh of off a university campus, and easily impressionable. An "object oriented" language without even the basics of scope visibility is not object oriented. Half done libs are not libs that one might consider production grade. Debugging tools where you need to dive into execution branches and heck knows what other archaic debugging techniques are not debugging tools. Lacking documentation or poorly written readme fiels are not documentation. This whole Python movement is gaining a bit of traction because it became popular in universities. The realities of real life programming will sway many religious programmers towards more suitable languages.

So yeah, fantasising about how Python "is eating the world" is a good dream, but the only thing that Python is eating is dust left behind by far more developed programming languages, surrounded by far more modern ecosystems around them.

Re: Python Is Eating the World

#684

Earlier quoted context omitted.

You've got it backwards. (Sound) Type systems guarantee correctness for the invariants encoded as types. If it compiles, you know it doesn't have any type related errors at all. With more evolved type systems even your program's logic (or large parts of it) is guaranteed. Tests just allow you to test random invariants about your program. If it compiles and your add() method works when passed 2, 2 and gives 4, it stil…

You need to test anyway. So, is it the case that type systems provide much value beyond what a proper set of tests, which are necessary, are going to provide anyway? If you skimp on testing your system will be crap, but at least the type system can fool you into thinking otherwise because it still compiles.

>You need to test anyway.

Actually, if your type system is powerful enough, you don't need to test. That's the source of the "if it compiles, 99% of the time it works right" people mention about Haskell (and even more so languages like Idris etc).

Type systems are tests -- just formal and compiler-enforced, not ad-hoc "whatever I felt like testing" tests, like unit tests are.

From there on it's up to the power of the type system. But even a simple type system like Java's makes whole classes of tests irrelevant and automatically checked.

A programmer can also leverage a simpler type system to enforce invariants in hand crafted types -- e.g. your "executeSQL" function could be made to only accept a "SafeString" type, not a "string" type, and the SafeString type could be made to only be constructed by a method that properly escapes SQL strings and params. Or the same way an Optional type ensures no null dereferences.

Re: Python Is Eating the World

#685

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

Here's some rational "hate" for Python then.

I just returned to Python for the first time in a little while to collaborate on a side project and ran into a few tricky-to-debug errors that caused a fair bit of lost time. Know what the errors were?

In one case, I was iterating over the contents of what was supposed to be a list, but in some rare circumstances could instead be a string. Instead of throwing a type error, Python happily went along with it, and iterated over each character in the string individually. This threw a wrench into the works because the list being iterated over was patterns, and when you apply a single character as a pattern you of course match much more than you're expecting.

And another one, I typoed a variable name as groups_keys instead of group_keys (or vice-versa, I don't remember). Instead of just throwing an error, Python happily went along with it, used an uninitialized value, and then all the logic broke.

There's entire classes of errors you can cause yourself in Python that aren't possible in stronger, statically-typed languages. For a large project, I'd pick the old and boring Java over Python every time.

Re: Python Is Eating the World

#686

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

[deleted]

Re: Python Is Eating the World

#687
post #34

Earlier quoted context omitted.

Meanwhile, all the python developers who have started doing any Js work are saying “I wish npm worked as easy as pip/virtualenv”... It really isn’t that difficult, it’s just different. Different always seems wrong, at first.

I haven't seriously JavaScript'd in a couple of years but my problem with it then was different versions of node or npm. Nice thing about python virtual environments is that problem never exists (can make environments with whatever version you want).

pipenv really solves the Python version problem, IIRC. I don't actually use pipenv, myself, since I haven't had time to thoroughly figure out the new magic and I prefer to know exactly what's going on with my Python's.

npm doesn't solve the duplicating of deps any better than python/pip, as far as I know. The react-native app I'm currently working on has a node_modules folder at 960Mb. That's probably bigger than nearly every virtualenv I've ever seen. A react-native node_modules on a bare project with `--template typescript` is at least 350Mb (created one a few minutes ago). I'm using nvm for node version management. No problems so far.

Re: Python Is Eating the World

#688

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

Here's some rational "hate" for Python then. I just returned to Python for the first time in a little while to collaborate on a side project and ran into a few tricky-to-debug errors that caused a fair bit of lost time. Know what the errors were? In one case, I was iterating over the contents of what was supposed to be a list, but in some rare circumstances could instead be a string. Instead of throwing a type error,…

> And another one, I typoed a variable name as groups_keys instead of group_keys (or vice-versa, I don't remember). Instead of just throwing an error, Python happily went along with it, used an uninitialized value, and then all the logic broke.

Python doesn't have uninitialized values, it throws NameError when you try to access a variable that hasn't been set. So I don't see how this could have happened.

Re: Python Is Eating the World

#689

Earlier quoted context omitted.

I'm a somewhat older programmer, and I've worked with a variety of languages (C, OCaml, C++, Scheme, Go, Java...). I think all of them are great in their own way and there's a lot to be learned with all of them. I started to use Python quite recently and I really like it. It is a well-designed language with high-level abstractions that are really fun to use. I like the pervasive use of iterators, the 'everything is a…

You shouldn't trust your programs. That's why you test them mercilessly.

But should you trust them afterwards?

Re: Python Is Eating the World

#690
post #642
post #587

Earlier quoted context omitted.

What does all this have to do with Fortran, terminals, or weaving your own core memory? Python's competitors are Lisp, OCaml, Swift, C# etc. I prefer at least Lisp and OCaml.

Python's actual competitors are Ruby, Perl, R, Shell, Visual Basic, Javascript, PHP, and Matlab. Nobody's going to bother out OCaml or Lisp for web development, data science, or OS scripting where Python is most often used.

Clojure has got pretty nice tools for web development (both backend and — with Clojurescript — frontend). It’s definitely out there in some places.
Post reply on HN