|
why is semantic whitespace so bad, can't you indent your code for god's sake if you're incapable of sticking with this simple convention your code is most likely garbage
|
# ? Aug 8, 2014 03:56 |
|
|
# ? Jun 12, 2024 02:11 |
|
the best thing you can do to a plang is restrict it until it's no longer a plang
|
# ? Aug 8, 2014 03:57 |
|
people itt whose ide automatically indents their loving code anyway crying about a lang where indentation matters
|
# ? Aug 8, 2014 04:19 |
|
things that move my code only serve to trigger my autism
|
# ? Aug 8, 2014 04:25 |
|
p much any language with semantic whitespace or optional semicolons or some kind of insane vendetta against expressions is essentially a p lang.
|
# ? Aug 8, 2014 04:35 |
|
the best feature of golang is gofmt python's semantic whitespace would still be terrible if they mandated tabs/spaces but having it heuristically determine it at runtime makes a bad thing even worse
|
# ? Aug 8, 2014 04:37 |
|
Notorious b.s.d. posted:the best feature of golang is gofmt yes
|
# ? Aug 8, 2014 04:40 |
|
Notorious b.s.d. posted:no python is ever beautiful yeah but enumerate, and the key argument in sorted is pretty ok
|
# ? Aug 8, 2014 05:07 |
|
Mr. Glass posted:when i programmed in python a lot i completely drank the koolaid and thought it was Good as well nah, it's good. when would you not want to indent the code anyway? the only problem is it should have enforced spaces-only
|
# ? Aug 8, 2014 05:15 |
|
why isn't the notion of non visible control characters universally mocked by everyone? the only worse control character i can think of would be meting out capital is and lower case Ls
|
# ? Aug 8, 2014 05:18 |
|
Corla Plankun posted:why isn't the notion of non visible control characters universally mocked by everyone? python exposure early in life causes much more brain damage than it does in adults
|
# ? Aug 8, 2014 05:23 |
|
Corla Plankun posted:why isn't the notion of non visible control characters universally mocked by everyone?
|
# ? Aug 8, 2014 05:33 |
|
ShadowHawk posted:lol if you don't think whitespace is visible that explains a lot of the hate
|
# ? Aug 8, 2014 05:33 |
|
Corla Plankun posted:why isn't the notion of non visible control characters universally mocked by everyone? :set list
|
# ? Aug 8, 2014 06:14 |
|
stop using bad languages tia
|
# ? Aug 8, 2014 06:16 |
|
Sweeper posted:stop using bad languages tia please list your good langauges
|
# ? Aug 8, 2014 06:26 |
|
my stepdads beer posted:please list your good langauges c
|
# ? Aug 8, 2014 06:33 |
|
MeramJert posted:nah, it's good. when would you not want to indent the code anyway? the only problem is it should have enforced spaces-only this is so fuckin dumb because if you just use the control character \t like god intended then set up your idiot editor for morons for \t to be however many spaces you htink it should be then i can just use \t and have it set to whatever the gently caress the default is (because im not cripplingly autistic) and tada now things just work but no, when i press tab, i want it to be functionally equivalent to mashing the space bar a bunch because
|
# ? Aug 8, 2014 06:34 |
|
my stepdads beer posted:please list your good langauges PHP
|
# ? Aug 8, 2014 06:40 |
|
indenting with space is bad any language that asks you to do that has bad style today and foreverially i like python for small stuff though (especially anything dealing with networking)
|
# ? Aug 8, 2014 06:52 |
|
Bloody posted:this is so fuckin dumb because if you just use the control character \t like god intended then set up your idiot editor for morons for \t to be however many spaces you htink it should be then i can just use \t and have it set to whatever the gently caress the default is (because im not cripplingly autistic) and tada now things just work wrong, spaces own.
|
# ? Aug 8, 2014 06:59 |
|
shrughes posted:p much any language with semantic whitespace or optional semicolons or some kind of insane vendetta against expressions is essentially a p lang. does this make Scala a plang
|
# ? Aug 8, 2014 07:02 |
|
Bloody posted:this is so fuckin dumb because if you just use the control character \t like god intended then set up your idiot editor for morons for \t to be however many spaces you htink it should be then i can just use \t and have it set to whatever the gently caress the default is (because im not cripplingly autistic) and tada now things just work
|
# ? Aug 8, 2014 07:09 |
|
shrughes posted:p much any language with semantic whitespace or optional semicolons or some kind of insane vendetta against expressions is essentially a p lang. python hates expression statements. this is a huge difference compared to javascript and jesus christ don't get me started about expression statements in javascript
|
# ? Aug 8, 2014 07:12 |
|
ShadowHawk posted:the reason to avoid tabs in python code is that if two different people are using different tab spacing in their editor the code will look different to them and they might make different style choices like when to wrap something in multiple lines wrong tab for indent then space for alignment. because the continuation of a line is one the same level as the beginning of the line it gets the same number of tabs, add spaces for aligning your text afterwards
|
# ? Aug 8, 2014 07:22 |
|
btw if ^[^\t]+\t matches anything in your codebase kill your colleagues+self
|
# ? Aug 8, 2014 07:25 |
|
Shinku ABOOKEN posted:wrong what he's saying is that if i prefer to keep my code under 80 columns but i have my editor set to display tabs at 4 spaces vs your 2 our ideas of what constitutes a line that is too long will differ
|
# ? Aug 8, 2014 07:27 |
|
Shinku ABOOKEN posted:btw if ^[^\t]+\t matches anything in your codebase kill your colleagues+self I think you mean [^\t]+\t (your regex is a piece of poo poo)
|
# ? Aug 8, 2014 07:31 |
|
Dessert Rose posted:what he's saying is that if i prefer to keep my code under 80 columns but i have my editor set to display tabs at 4 spaces vs your 2 our ideas of what constitutes a line that is too long will differ if it's a problem for you then you can 1) tell your teammate to stop writing very long lines 2) resize your console 3) resize your tab
|
# ? Aug 8, 2014 07:40 |
|
now i want to write a github bot that finds projects that use tabs for indentation and submits a pull request to convert it all to spaces
|
# ? Aug 8, 2014 08:01 |
|
MeramJert posted:now i want to write a github bot that finds projects that use tabs for indentation and submits a pull request to convert it all to spaces i remember there a bot that posted issues regarding undefined behavior in random repos that didn't ask for it can't find the link tho
|
# ? Aug 8, 2014 08:09 |
|
if the hate of semantic whitespace in python and haskell is due to being a butthurt tab user, you may want to consider using an editor that lets you have per-language or per-project settings so your tools stop making you have such strong feelings about irrelevant poo poo, and stop having you faint at it the way a victorian era lady would
|
# ? Aug 8, 2014 12:00 |
|
MononcQc posted:if the hate of semantic whitespace in python and haskell is due to being a butthurt tab user, you may want to consider using an editor that lets you have per-language or per-project settings so your tools stop making you have such strong feelings about irrelevant poo poo, and stop having you faint at it the way a victorian era lady would haskell's indentation is optional; u can use brackets and semiconolsn if u rly want
|
# ? Aug 8, 2014 12:05 |
|
"Notorious damme of the B.S.D. has fallen ill after looking past the hedges of her IDEs, my lord" "Send a
|
# ? Aug 8, 2014 12:05 |
|
prefect posted:more on-topic, what's the general opinion here of python? (i already know what you think, shaggar) it's ok - it has reasonable cross platform support - it has a lot of third party libraries, including plugging into big things like Qt, so you can prototype stuff up. - it has a lot of third party mathematics and statistics stuff, so it's pretty good for cheap-rear end number crunching. - docs.python.org is pretty comprehensive. - the import statement is pretty ace, and in general importing something doesn't monkeypatch the poo poo out of things - from __future__ import is pretty ace, and python has a good history of backwards and forwards compatibility it's a pretty good glue language to mash powerful libraries together, and for smallish projects <20kloc it handles well. it's a bit bad - the standard library predates a lot of python features and idioms developed later - handling unicode and bytes is possible but it doesn't save you from knowing how to do it - python 3 migration has been slow, clumsy, and awkward, but it's pretty reasonable to start new projects in py3 now http://py3readiness.org/, but migrating from 2 to 3 is probably still a lot of effort, it involves a substantial rewrite of most of the code, and py2/3 cross compatible code is clunky as hell. python 2 is ok, python 3 looks better but has far less community support and momentum. it's a bit terrible - some parts of the stdlib need to be taken out the back and shot - in larger projects, a lack of defined interfaces between parts can backfire Brain Candy posted:ffs, you can even see when somebody was feeling clever, the most dangerous thing this is basically why i like python: python is not a language to feel clever for writing in. although there are things like metaclasses, there is a strong community push towards "write the most obvious thing", and pushing away from clever bits of metaprogramming. Corla Plankun posted:why isn't the notion of non visible control characters universally mocked by everyone? (thing is, indentation *is* visible. semantic trailing whitespace, like in markdown, is the devils work)
|
# ? Aug 8, 2014 12:25 |
|
Yeah. I learned web dev in Python, and while I tend to be much more across JavaScript front end these days, and I'm using Scala for my back end work, Python is still my goto for smaller stuff. It encourages readable code, clear dependency declaration, and as you say, doesn't let you get too clever when simple will do. My experience with the ecosystem has also been far better than most others as far as versioning and well written documentation goes. It helps that it never got into some toxic library patterns like monkey patching everything. Luckily modern JavaScript libraries have generally got that memo too.
|
# ? Aug 8, 2014 12:43 |
|
the problem i have with python 3 is that it's not sufficiently more useful than python 2 to be worth the pain of migration. as someone who does as much byte janitoring as unicode janitoring, the big unicode switch doesn't improve things a lot, and despite a whole slew of small nice features, changes, and libraries appearing in 3, nothing yet has been enough to drag work code across.
|
# ? Aug 8, 2014 13:10 |
|
tef posted:the problem i have with python 3 is that it's not sufficiently more useful than python 2 to be worth the pain of migration.
|
# ? Aug 8, 2014 13:18 |
|
Maluco Marinero posted:It encourages readable code, clear dependency declaration, and as you say, doesn't let you get too clever when simple will do. maybe it's just that most "clever" patterns have already been incorporated into the language as its idioms so each successive generation's failure to find "clever" ways of doing things in python is actually a failure to find actually clever ways of doing things in python
|
# ? Aug 8, 2014 13:21 |
|
|
# ? Jun 12, 2024 02:11 |
|
tef posted:as someone who does as much byte janitoring as unicode janitoring, coffeetable fucked around with this message at 13:26 on Aug 8, 2014 |
# ? Aug 8, 2014 13:24 |