23 ms·
Don't know about decorators. The real issues with Python that I find working at Red Hat (unfortunately Python and Ruby are popular choices here): - generally
by rwmj 16y ago
Don't know about decorators. The real issues with Python that I find working at Red Hat (unfortunately Python and Ruby are popular choices here):
- generally poor choices for implementation: inefficient storage of values
- 64 bit version approximately doubles the size of all data
- interpreted, no code generator so it's very slow
- lack of type safety is a constant source of bugs that just wouldn't appear in other languages
- whitespace layout screws up patches silently
Edit: don't downvote, comment on what I have to say.
- viraptor 16y ago- 64 bit issue is going to be the same for all languages. Twice the pointer size, twice the data size (unless you're using a very specific type) - No code generators? You could complain that they're not good enough, don't support some specific extensions, don't play nice with threading, or something else, but there are many versions of python which work as compilers. Just google a bit. - Lack of type safety is there by design. If you want type checking, why are you even looking at duck-typed scripting languages? It's a basic design decision, not something that could be changed / improved. - Why is whitespace even an issue in patches? If anyone submits a patch, they should use exactly the same style as the rest of the file. If they don't, patch should be rejected. The same thing happens in projects where indentation doesn't really matter. Also, it's hard to "silently" screw up code covered by tests. Any big enough project should have those...
- rwmj 16y agoThanks for replying. The 64 bit issue is definitely not the "same for all languages". Programs get slightly bigger, but don't double in size as happens for Python programs. Most Linux 64 bit C programs will be using 32 bit 'int'. Python consumes 24 bytes to store any single int on 64 bit. Code generators: I mean ones which anyone uses. Lack of type safety: it may well be "by design", but it's a dumb design which causes lots of problems. Search Bugzilla for Python tracebacks and you'll see hundreds of bugs caused by lack of basic compile-time type checks. It's easy for a compiler to check that a function you're calling requires 3 arguments of type foo, bar and baz, and not doing that simply causes lots of errors. The whitespace issue is also real: if/else changes its meaning completely if you're not hyper-careful about how you apply patches (especially when you have to make manual fixes to patches to get them to apply).
- jshen 16y agoI've been doing python and ruby full time for the past 8 years. In that time I can count on one hand the number of bugs which got into production because of a lack of static typing. The gain in productivity from using dynamic languages in that time far far exceeds the cost of those few bugs.
- rwmj 16y agoWell Red Hat have suffered from thousands and thousands of such bugs. Don't believe me? Check for yourself: http://www.google.co.uk/search?q=site%3Abugzilla.redhat.com+%22traceback%22+%22AttributeError%22 http://www.google.co.uk/search?q=site%3Abugzilla.redhat.com+... http://www.google.co.uk/search?q=site%3Abugzilla.redhat.com+%22traceback%22+%22NameError%22 http://www.google.co.uk/search?q=site%3Abugzilla.redhat.com+... http://www.google.co.uk/search?q=site%3Abugzilla.redhat.com+%22traceback%22+%22ValueError%22 http://www.google.co.uk/search?q=site%3Abugzilla.redhat.com+... (There are many more searches of this type you can do).
- kenneth_reitz 16y agoRedHat clearly needs better developers.
- jshen 16y agoThere are a few conclusions that we can draw. Red hat engineers suck (I know this isn't true) I'm a genius (this isn't true either) Different types of software have different needs and we shouldn't generalize about all software development based on our particular niche. Writing code that runs on other peoples systems is much harder than writing code that will run on servers I control. Python and ruby are great for the latter. I've never done the former at the scale of redhat. Writing code with a lot of collaborators is harder than writing it with a few collaborators. What language do you prefer for your type of work?
- rwmj 16y agoOCaml
- gaius 16y agoThe problem with Red Hat is it's stuck on Python 2.4. Altho' the hassle of persuading the SAs to install ActiveState too was what led me to OCaml, so it's not all bad :-D
- rwmj 16y agoRed Hat are deploying Python 3 right now ... ... which is another saga. Python 3 is "close" but incompatible with Python 2.x, and the way around this is to have two installed copies of everything. Sheesh, brilliant plan. (In case it's not obvious, I really dislike Python).
- gaius 16y agoI'd like to have seen /usr/sbin/python (this is the one the OS uses itself) and /usr/bin/python (this one's for users). So you could patch them independently without straying outside of "official" RPMs.
- kenneth_reitz 16y agoI LOVE this idea. Do any mainstream distros do this now?
- gaius 16y agoNot that I'm aware of. In practice we leave /usr/bin/python untouched (on 2.4) and install ActivePython in /opt. That makes the estate slightly less manageable because now Red Hat isn't doing all the integration and maintenance for us (and RH costs a fortune, as in more than Windows) but what can you do? People want to use 2.6 features at the very minimum.
- cdavid 16y agoI really like python, and FWIW, I find the whole python 3 saga a disaster. The small improvements really did not justify breaking backward compatibility.
- Daishiman 16y agoYour complains sound more about dynamic languages in general than Python.