Python isn't the worst language, and since your employer isn't likely to let you program in Scheme/Haskell/Smalltalk/J/whatever it's often better than the alternative i.e. Java.
Name:
Anonymous2011-12-05 11:24
Market demand: when a jewish employer wants you to use Python or Java, a goy, like you, is not supposed to ask "why". You'll eat shit, when ordered, goy.
>>10 It has a single callable type and not a clusterfuck of procs, lambdas, sprogs and dongles. Yet it's terrible for functional style.
It is slow but not stupid slow. Actually, CPython (the only usable implementation thanks to the lack of a stable API) is ridiculously slow for what it does, mainly due to its very badly designed GC and threading model.
mainly due to its very badly designed GC and threading model.
Stopped reading right there. Complaining about Python's GC is a very useful symptom of mental retardation.
visually, perl and ruby code is stuffed with symbols, python code is more plainly textual.
ruby and perl users both delight in horrific black magic hackery, whereas python users like to be "explicit" and make you pay a __tax__ for __hacking__ that makes your code __ugly__
python is "there is one retarded way to do it"
perl and ruby are "there are many retarded ways to do it"
Why do you morons keep arguing which language is better than the other when you clearly don't program anything at all. And no language can be the 66best99 at every task.
Clearly there are some tasks which python is better suited than C or sepples or CL usw.
>>17
Decent explanation. I only speak a few dialects of retard, and can thankfully still figure out the full-retard Python code that appears here. Couldn't be bothered doing the same for perl/ruby. Also, I'll take __writing__ over .getting() and .setting() any day, but even the trolls aren't brazen enough to suggest otherwise.
>>23
Nearly everything ...but the HTTP libraries. WTF guys.
I really don't understand why python is so slow. I get that it could be complex to parse and all, but once that phase is over, it should run fast right? Is there anything special about python that forces it to be slower than any other dynamic language?
getting and setting is a very powerful abstraction technique, that allows data types to change while having their data accessed through a consistent interface. When other part os the program have direct access to member variables of other objects, they lock those objects by creating work that you would need to do if you were to ever change the layout of the exposed objects.
Name:
Anonymous2011-12-07 6:23
>>32
In Python, you have property, which makes accessing a member call a method. No need for explicit getter/setter calls.
myAnus = Anus()
if myAnus.haxxed == "thoroughly":
print 'NO EXCEPTIONS'
Using get/set (in any language) wouldn't save you from needing to mirror the change in class with the if statement. If you wanted that kind of resilience sprinkled about your code, you'd use a method in the first place.
### Should've been doing this all along... ###
class Anus:
def __init__(self):
self.haxxed = "thoroughly"
But what if the state that determined whether or not the anus was haxed was moved into another class. Like if the anus had a key that was used to index into another data structure, or database, or do a query to another machine over the internet, and then the haxed state would be retrieved. You could modify the getHaxed and setHaxed methods to implement this, and the calling code would not need to be changed. If the calling code happens to be 50,000 lines of code, separated among 100 different files, in 26 different directories, then that could save a lot of time.
>>43
That is certainly why I laugh out loud when Python users say it's superior for they have their OOP, e.g. compared to Perl
package Classy {
use Moose;
has 'style', is => 'ro', default => sub { 1 };
}