6 ms·
OK, so I love Python. But you are going to find people in the Python world telling you to abide by PEP8. And saying that you should be using virtualenv. And sa
by reuser 15y ago
OK, so I love Python.
But you are going to find people in the Python world telling you to abide by PEP8. And saying that you should be using virtualenv. And saying that you should not use (module-level) globals. And saying that you should be using various checking tools. And the checking tools may say annoying things (some of which will be good points about your code).
And I'm kind of one of those people, as well; not saying that there aren't reasons to break a rule, or that it instantly makes your code crap if you do, but I understand these arguments.
And a vocal number of those on Python IRC channels tend to be dicks to newbies or people with unusual ideas.
So I guess I would question whether Python is going to give you what you want. I can't speak much to Ruby's culture.
Use the tools you like which make your life better, and if it makes your life better then ignore other people's unsolicited opinions on the internet and just do your thing.
- TylerE 15y agoPython is much better positioned here, since the default is to be sane. So the typical question is "I'm trying to do something a bit odd, can I?" vs "Help, that unlabeled lever I bumped into just blew my foot off."
- berntb 15y ago>>Python is much better positioned here, since the default is to be sane. As opposed to Perl? Are you trolling or can you list a few insane things in e.g. the Perl Best Practices book? Edit: page 470 of Perl Best Practices (also pg 429 and 431) -- recommends using strict and warnings. It is hardly controversial or insane, it catches bugs.
- TylerE 15y agoWell, in Perl, you have to turn on `use strict`.
- hythloday 15y agoif there are 469 pages of best practices more important than "use strict", I think "insane" is a fair description of the language. I'm not making the point it's impossible to write good Perl, because I know it's possible, I'm saying it's easy to write bad Perl - much easier than in most other languages I've seen.
- berntb 15y agoSigh, the best practices book is not only about syntax. Troll much? (If you do crave bondage and discipline use Java.) There are advantages and disadvantages with everything. Some of Perl's advantages today are CPAN, Moose and quite extensible syntax. This is a good example of those three advantages: http://search.cpan.org/~flora/MooseX-Declare-0.35/lib/MooseX/Declare.pm http://search.cpan.org/~flora/MooseX-Declare-0.35/lib/MooseX... (Note the optional typing of method parameters and attributes.)
- jbooth 15y agoYeah, as opposed to perl. I have to add "my" to a variable to get reasonably-sane scoping, the default is that everything's global. Perl's defaults tend more to the insane side of the spectrum, especially in comparison with Python (who's entire design philosophy is a reaction to Perl). Not that there's anything wrong with that, and if you've done mostly perl I'm sure it seems natural, but compared to conventions across every other mainstream language it seems crazy.
- draegtun 15y ago> I have to add "my" to a variable to get reasonably-sane scoping, the default is that everything's global To be precise if strict is not enabled then any variable declared without a "my" becomes a package variable. With use strict enabled then any variable declared without my, our or state will give a compilation error. > Perl's defaults tend more to the insane side of the spectrum, especially in comparison with Python Actually Perl with use strict is the sanest IMHO. Because this means that Perl avoids the sloppy (but serious) errors that can easily creep into code in languages that don't have explicit scoping / variable declaration: http://news.ycombinator.com/item?id=3087990 http://news.ycombinator.com/item?id=3087990 | http://news.ycombinator.com/item?id=3587659 http://news.ycombinator.com/item?id=3587659