3 ms·
Referring to Python hype as "snake oil" is hilarious; I recommend anyone arguing the underlying thought use it.
by DigiDigiorno 4y ago
Referring to Python hype as "snake oil" is hilarious; I recommend anyone arguing the underlying thought use it.
- z9znz 4y agoI use Python all day every day. It's horrible compared to many other languages I have used. There are many versions of hype promoted for Python. Coal powered steam locomotives were great in their day, before there were better alternatives. But we don't irrationally hold the mentality that there is nothing better and why would you need anything else anyway? Tell me any library which can only be built for Python? Tell me any feature of Python which does not exist in one or more other languages? Then I'll tell you at least some features which exist in several other languages but which do not in Python. Python is inferior, and frankly anyone who is infatuated with it is ignorant of the other, better options.
- DigiDigiorno 4y agoAnyone who is "infatuated" with ANY tool is likely ignorant of alternatives. That said, I think python is a very convenient wrapper for lower language utilizing scipy libraries. I also think it is great for quick prototyping. (It's been a couple years, but I even prototyped PySide Qt stuff in ipython notebooks, now Jupyter notebooks, back in the day). Now, simply the popularity (perhaps created by luck), led to a huge ecosystem of scipy tools for the science community. That in-and-of-itself snowballed into a reason to use it. Could that have happened to a different language? Yes. but that doesn't invalidate that it DID happen to Python. Perhaps your day job forces you to use the Python hammer for a screw problem; I'm sure that problem frustrates a lot of us working people, but I don't think it's inferior for the specific uses I outlined.
- z9znz 4y agoI guess that's the problem. Python is just fine for many narrow tasks. But the people who use it, or the people who manage teams who use it, don't know how important it is to consider proper tooling when it comes time to turn the small thing into a big thing. There's nothing wrong with using Python and its great libraries for some purposes. But none of those cases mean that Python is a good language. And frankly, the better the library is, the less Python language features you would use directly. The powerful libraries hide the failures of the parent language. But as soon as you need to build something around your solution, unless you have another library which does the new thing you need (and encapsulates your solution neatly), then you will end up using real Python, on a larger scale. Then you will start disliking it.
- eesmith 4y ago> Tell me any library which can only be built for Python? Are you really making the "every programming language is Turing-computable" argument? All your talk of features is missing an important point - Python is one of the few languages designed with insight from how to develop a programming language for non-programmers. In Python's case, experience drawn from ABC. These are people for whom "public class java { public static void" is a barrier to entry. For whom diagnosing segfaults is arcane knowledge. And for whom hygienic macros sounds like a bathroom product. I like Python because it's a language that my colleagues - most of whom are not software developers but who do some programming for their research - can productively use. Even with all the complexity of modern Python. So no, there are zero features in Python which don't exist in other programming languages. And it doesn't matter. What better options do you suggest to a grad student in chemistry, biology, or physics?
- z9znz 4y agoYou are just arguing that a simple language is good for beginners, and I agree with that. We want a beginner language which has easy (and consistent) syntax, no requirement to specify datatypes (implicit), and can be interpreted (no compiling required). In its most basic use, namely just writing procedural code with basic built-in data structures, Python is pretty ok. But it has some warts and gotchas, not the least of which is mutable default parameters in functions. Now maybe the ultimate beginner doesn't use defaults for parameters, so it's not a problem (yet) for them. Same goes for the OO features. While the beginner may not write OO Python, using modules written by other people probably will require them to step into the Python version of OO. Now it gets messier. Ruby is superior in the simple beginner case and the complex (OOP) case. It is superior and more consistent for functional cases as well, despite it not being designed as a functional language (it still has mutability risks all over the place as does Python, except for that default parameter razorblade). The only beginner-unfriendly thing I can think of for Ruby is the optional parenthesis on function calls. I still think optional parens is a bad design choice, and I encourage people to always use them. It's usually a style choice (but not always, because sometimes it matters for how code is parsed), and I think it's better to know as a reader that foo.bar() is a function being called. foo.bar is unclear. One small but significant feature Ruby provides is the ability to write more expressive function names with ? and !. A common pattern is to use foo? to indicate that the function will return a boolean. The alternative, without ?, is is_foo(). Likewise, ! usually (at least for standard libraries) indicates mutation. Back to the point though, Python used simply in isolation is not terrible for a beginner. But inevitably outside modules will get used, and the misfeatures of Python will appear more frequently. And then a further eventuality is that this new programmer will now be a "python programmer", choosing Python for future bigger work because that's what they know. Why not start with a language that is also beginner friendly but also better for large, long-lived projects?