5 ms·
When I first encountered Python, it was as an alternative to Perl. Given the choice between Perl and Python, I think it's clear why the latter won out.
by tobinfricke 3y ago
When I first encountered Python, it was as an alternative to Perl.
Given the choice between Perl and Python, I think it's clear why the latter won out.
- worik 3y ago> When I first encountered Python, it was as an alternative to Perl. Me too I am amazed that Python won out against Perl Perl is much easier to use. Does not have the incredibly irritating treatment of whitespace Perl was a disrupter, whereas Python was "computer sciencey". A false dichotomy but it really mattered to people
- JAlexoid 3y agoPerl being easier to use is a joke... Ruby suffers the same issue as Perl does - you can do the same thing a million different ways, that's too many.
- zzzeek 3y agoa million different ways, but all with liberal use of human-unfriendly symbols like dollar signs, at signs, pound signs, etc.
- NegativeK 3y agoI loved Perl. I _loved_ it. It was so much fun. It felt like vim in how you could guess weird corners of the language. But every reason that made it fun is also an actual reason why it's a nightmare unless you are very strict in how its used. Strict on things like whitespace.
- tetha 3y agoI was about to say, as much as I enjoy python. Perl is more effective than Python. You can do some pretty amazing things in Perl in a few lines. You can also do amazingly readable scripts in Perl. But... if you aren't careful how you write perl, it's a very bad pit to fall down to. Python just forces you to write code that's better for the team.
- ipaddr 3y agoWhitespace strictness is the biggest downside of python.
- mixmastamyk 3y agoIt’s the biggest upside.
- tobinfricke 3y agoThe use of whitespace in Python was controversial 20+ years ago. These days it seems like no big deal. The only annoyance is when copy-and-pasting code from one place to another, the indentation can get screwed up, which is a small annoyance. But other than that, this seems like an argument that was settled 20 years ago.
- NegativeK 3y agoIn my experience, Python has way bigger warts than something that's just automatically handled by my IDE.
- TulliusCicero 3y agoPerl is a write-only language, whereas Python almost reads like pseudocode. They're on absolutely opposite ends of the readability spectrum.
- VerminOctopus1 3y agoA bizarre opinion to be sure. Python is vastly more readable then Perl and is far easier to write as well, hence so many educators in schools reaching for it.
- tobinfricke 3y agoI can understand a love of Perl by folks who love a good puzzle, or who are interested in "code golf" (trying to get something done in the fewest number of characters). But those are not great traits for a general-purpose programming language. I agree with the other response: "Python just forces you to write code that's better for the team."
- TheCleric 3y agoSome people (me included) LOVED the whitespace-as-a-feature. I had swam through too many scripts where everything (regardless of nesting level) was all on the first character of a line or otherwise spaced randomly where my first step was to properly indent just to understand what it was doing. A language that enforced that was a Godsend.
- mixmastamyk 3y ago“masterstoke” was the term I used when I discovered it.
- worik 3y agoGoes to show there is no pleasing everybody
- tobinfricke 3y agoNowadays in languages like C/C++/Go/etc we typically enforce the use of an autoformatter to convert source code to a canonical style. It's also great for removing all discussion of such formatting from code reviews.