News for hackers. Stuff that matters.
Re:My Impressions of Gleam by fire_lake on Saturday January 25, 2025 @09:07AM (#42821721)
It’s quicker to move code around with whitespace because you can just tab it in and out, move lines etc.

The best solution is to ban tabs entirely from the syntax - only allow spaces in multiples of 2.

Re:My Impressions of Gleam by dartos on Saturday January 25, 2025 @09:12AM (#42821750)
I can’t agree with that.

Curly bracket blocks are obviously visible at a glance. If I incorrectly move one around it’s obvious.

If I shift tab a section of python code around, I may be breaking an if state without noticing if I didn’t pay attention to a specific colon on one line.

Imo s-expressions are the easiest to move around, but have the same issue of being hard to scan as tabs.

Re:My Impressions of Gleam by fire_lake on Saturday January 25, 2025 @04:27PM (#42824993)
Whitespace works better in the context of statically typed functional programming, I’ll give you that!
Re:My Impressions of Gleam by lylejantzi3rd on Saturday January 25, 2025 @09:21AM (#42821799)
It's easier and quicker to move code around with braces when you're using vim. Vim has motions for selecting, editing, copying, etc everything between two braces. Without the braces, it makes moving that code around much more difficult, and error prone.
Re:My Impressions of Gleam by lawn on Saturday January 25, 2025 @09:40AM (#42821885)
Although I agree in general you can configure capture and move to be whitespace sensitive, for example by relying on tree-sitter.