Remix.run Logo
ByGhacaxda 18 hours ago

I've never used Helix and I likely never will, so I've got no horse in this race. But code folding, seriously? I'd be totally against it. It's yet another editor feature that ties your source code to tooling. It allows you to write too large and too many functions, while keeping the code readable to yourself. Source code should be readable (mostly) independently of tooling. It should be readable when printed to paper. (This is also why type inference in languages that aren't inherently functional languages is incredibly stupid; I understand that the compiler can infer the type under "auto", but now, when reviewing the code, I too must. Who the fuck wants that, seriously.)

And I'm unsure what your problem is with the discussion in the ticket. I've now read the first comment (the feature request), and the last comment (the one you highlighted). Both sound totally reasonable to me.

freedomben 18 hours ago | parent | next [-]

Could not agree more with everything you said. I hate code folding because it leads to giant functions and blocks that are way too big, but because of the folding people don't have to look at it and scroll (which if they did, they would be much less inclined to write and ship such shit in the first place). Same with type inference. It's almost no effort to write out the type, and it's eminently readable. With type inference, it's not at all obvious. I usually get "well you can just hover over it with the IDE and it will tell you the type." I don't want to have to hover over stuff just to see the type! Not only is that a major downgrade from the previous state where it was just "String some_str" or whatever, but having to pause and grab the mouse and move it over to the variable is majorly disruptive to reading and requires me to use a mouse (which I don't normally use). Also, I use neovim, not whatever IDE you use and think everyone else must use.

I likewise thought the final response linked to was great. It was straightforward and to the point.

MoreQARespect 4 hours ago | parent [-]

The way to prevent giant classes and methods is with linting rules, not by crippling your text editor.

type inference makes code waaaaaay less verbose which aids readability.

eviks 11 hours ago | parent | prev [-]

> It should be readable when printed to paper.

Why should anyone waste time targeting a dead use case?

teo_zero 7 hours ago | parent [-]

Right. But if we replace 'paper' with 'webpage' the parent post is still relevant.

eviks 7 hours ago | parent [-]

Web page can run (and some code-focused pages do) code folding code, so the question is still relevant with minor modification.

The whole premise of losing productivity and spending time in the most common case to support underpowered rare use cases is deeply flawed.

It's similar to the argument for using bad defaults in config/keybinds 99% of the time just because in 1% of the time you would use another computer without your customizations.