Why did Quora choose Python for its development?

John Bokma john at castleamber.com
Tue May 24 19:16:06 EDT 2011


Chris Angelico <rosuav at gmail.com> writes:

> On Wed, May 25, 2011 at 3:39 AM, D'Arcy J.M. Cain <darcy at druid.net> wrote:
>> My point was that even proponents of the language can make a
>> significant error based on the way the variable is named.  It's like
>> the old Fortran IV that I first learned where the name of the variable
>> determined whether it was an integer or a floating point.
>
> I believe that's the origin of one of the proofs that God is real
> (unless declared integer). And hey, I can't hate something that gave
> us the classic use of i, j, k as loop indices!
>
>> One of my favorite quotes (not sure if it was about Perl or APL) is "I
>> refuse to use a programming language where the proponents of it stick
>> snippets under each other's nose and say 'I bet you can't guess what
>> this does.'"
>
> Yes, I believe that was Perl. And an amusing quote. But most of the
> point of it comes from the fact that Perl uses punctuation for most of
> its keywords,

For example?

> whereas (say) Python uses English words; it's a lot more
> fun to crunch something down when you can use $|

That's not a keyword but a special (global) variable. On top of that,
you don't have to use it [1] and most people most likely encounter this in
(badly) written CGI scripts originating in the last century.

Yes, Perl is fantastic for writing hard to read obfuscated code. And
yes, newbies are great at writing this from the very start, especially
since they seem to copy paste examples written by other newbies (often
written in the previous century...). But Perl doesn't force one to write
unreadable code. If Perl was really so unreadable, why haven't I /still/
not switched to Python? What keeps me going back to Perl?

> and friends than when you have to put "x and y", complete with spaces,
> for a simple boolean.

Perl has also the and logical operator. This is legal Perl:

if ( $x and $y ) {
  print "yes\n";
}

[1] You can use $OUTPUT_AUTOFLUSH (use English;), or use IO::Handle and
use the autoflush method [2].

[2] In Perl 5.14 IO::File is now loaded on demand:
    http://search.cpan.org/dist/perl/pod/perldelta.pod#Filehandle_method_calls_load_IO::File_on_demand

-- 
John Bokma                                                               j3b

Blog: http://johnbokma.com/        Perl Consultancy: http://castleamber.com/
Perl for books:    http://johnbokma.com/perl/help-in-exchange-for-books.html



More information about the Python-list mailing list