Remix.run Logo
▲ Garlef 4 hours ago

Maybe not for me but I love the attitude.

(And actually, my personal objection is incidental: The python syntax is not pretty to begin with and the situation does not improve with even more visual verbosity)

▲skeledrew 4 hours ago | parent [-]

> The python syntax is not pretty to begin

That's an interesting objection, given Python is the closest programming language to English. Understandable if your native language isn't English, but really strange otherwise IMO.

▲stackghost 2 hours ago | parent | next [-]

Semantic indentation is fundamentally an insane design. And I don't mean "insane" as a colloquialism for "dumb". I mean it is literally not a sane choice to make.

English would make a horrid programming language, so being close to it is not a plus.

▲UltraSane 25 minutes ago | parent | next [-]

Considering the endless arguments over C syntax I really don't see what is so weird about Python indentation. It has the nice effect of making code look a lot more consistent.

▲teiferer 2 hours ago | parent | prev [-]

In the age of auto-formatters, I have less and less sympathy for this point of view.

Any widely used formatter indents along semantics anyway, so why clutter your code with curly braces everywhere if stucture is clear from indentation? Might as well make it semantic.

Before auto-formatters, there was the occasional case where you could argue that some quick hack made something more readable, at the expense of less consistency and wasted time arguing about this in code reviews. But that ship has sailed, arguably rightfully so.

And that doesn't even bring the LLM angle. If code is generated by a machine anyway and you just review it, if even that, why still bash indentation as a semantic construct?

▲stackghost an hour ago | parent [-]

If you have to run your source code through a formatter to make sure it doesn’t have mixed tabs and spaces that is not the flex you seem to think it is.

If you’re going to just have an LLM write all the code anyway why bother with a slow janky mess like python at all? Just make it write rust or java or go or literally anything.

Imagine having a magical machine that can write code in any programming language ever conceived, and you ask it to pick the language whose community thinks virtualenvs are a reasonable solution as opposed to a mark of profound shame. Couldn’t be me.

▲lefra an hour ago | parent | prev [-]

Python code using advanced features of the language (see for example [1]) look as much like line noise as C++ template metaprogramming. If "close to the english language" is your criterion, I believe COBOL should rank higher than python:

ADD transaction-balance TO total-balance.

Is readable to a layman whereas this isn’t:

total-balance += transaction-balance

Or even worse for someone who learned algebra but not programming (this looks like an equation, and transaction-balance is therefore equal to zero):

total-balance = total-balance + transaction-balance

[1] https://stackoverflow.com/questions/6760685/what-is-the-best...