Hacker News new | past | comments | ask | show | jobs | submit login

I write python professionally and honestly, who cares about the 80 character limit? Just ignore it! :)



I do. This is 2019, and I like being able to see at least three files side-by-side without squinting my eyes, thank you very much.

Yes, I know I'm in the minority these days. :/


I have 3-4 files side by side, Everything else is max 80 chars. I really don't understand why people need more, because long lines are REALLY HARD to read.


You mean like 64 chars, after you account for typical indentation? I hit that limit way too often when using descriptive names.

I usually view two files side by side per screen (so 4 in total). I sometimes up this to 3 per screen, but the trick here is to use a smaller font. Right now, if I split my editor into 3 panes, each has 98 columns available.


what if the overly restrictive character limit causes a decrease in naming clarity?


I guess it can happen, but in my experience, I had more problems with overly long names hurting readability: something like ExampleDataUpdaterFactoryConfigReader. (No, I don't think IDE makes them acceptable because you still have to read them in the code, IDE or not.)

Of course, 80-character limit doesn't guarantee good naming, but it acts as a friction against adopting ultra-long names, occasionally forcing devs to find a better alternative. YMMV.


What naming clarity? Isn't every Python variable called "spam" or "eggs" anyway? ;-)


Then may I respectfully submit you or your employer should buy an appropriate monitor or you chould use two.

I'm not asking for 300 character lines. A 25% increase would be a rational and sufficient nod to the fact that monitors are bigger.


I work at the same place you do. I code often enough from my macbook, using likely the same tools that you use, and they're truly painful with >80 character lines. I don't understand how Go and Java devs survive.

I also don't think an 80 character line limit is a bad thing: small well defined functions that do only one thing are good. Long lines often encourage people to want to nest code deeply (which is terrible!) or to write complex one-liners, and that + list comprehensions is a dangerous pairing.


Java dev here. I would try and defend a 120 character limit but I have a 34" 5k widescreen monitor so I probably don't have a leg to stand on.

I'm writing a mix of Java and python at the moment. Python for lambdas behind an API gateway and Java on some containers for stuff that's more complex but evolves more slowly.

It's neither python or Java where I'm really spending my time though. It's CloudFormation, Ansible, Jenkins and stitching the whole system together for CD that's killing me. I feel like programming languages are the easy bit these days.


> I feel like programming languages are the easy bit these days.

Agreed. The mainstream garbage-collected languages are all basically the same in the grand scheme of things. The work that takes most of my time (and growing) lately is packaging, testing, deployment, etc.


The only tool that gets remotely irritable about it is the one we use for diff reviewing, afaict?

> I also don't think an 80 character line limit is a bad thing: small well defined functions that do only one thing are good. Long lines often encourage people to want to nest code deeply (which is terrible!) or to write complex one-liners, and that + list comprehensions is a dangerous pairing.

Python already starts you out at a nest of 2-4 characters, so we don't even get the full 80.

But honestly I don't think a 100 character line is going to doom us all to hyper-nested expressions.


I've never worked at a place where the prevailing python culture wasn't to set the linter on kill and just let go wild.


Well that sounds like a personal problem and it has nothing to do with the language. As a counter-anecdote, I've been working on Python projects for over a decade and have yet to experience the draconian linter settings you described.


> Well that sounds like a personal problem

Have I given you the impression that any of the opinions or experiences I have expressed here are not personal?

I've never not encountered them, so I guess you're just lucky.


Any language can benefit from the beauty of enforcing general typography guidelines that go back 100+ years.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: