News for hackers. Stuff that matters.
Re:Ruby 3.2.0 Is from Another Dimension by dragonwriter on Wednesday January 04, 2023 @01:36PM (#34249533)
> Moving blocks of code in Python requires great care, especially since the editor cannot reasonably guess which scope level the paste should go into.

Even when I was new to python, the only problem I ever really had with this is when I mess up and copy the first line starting at the the first nonwhitespace character so the relative indentation is wrong. When do you ever move a block and not know what scope you want it in? At most, with really long blocks, you fold the more deeply nested blocks before pasting.

> Also, the lack of an _end_ or bracket as with other languages means the editor cannot visually assist with identifying block boundaries.

No, it doesn’t. In practice, editors usually don’t, but they recognize the beginning and ending of blocks, and use it for folding, which means they could insert phantom labels (as editors often use for blame information, inferred type signatures, etc.) to provide informatiom about the block ending (and even align them to indicate the indentation level corresponding to each ending block.)

An existing line of text is not necessary for editors to provide feedback.

There are no comments on this comment yet.