I’m more concerned about that poor stack with all those recursions.
It’s also O(n^2). I’m not sure what they’re trying to do, but I’m sure it can be done in O(n).
Reject.
My credo on this kind of thing is never do something that will make your successor so mad that they find out where you live and post parts of your body to Interpol.
Good fences make good neighbors.
Corollary: server-side commit hooks make good teammates.
Python with extra steps
Don’t threaten me with a good time.
The braces need indentation, of course.
Fibonacci indentation of course.
I kinda like it, easy to see unbalanced braces
Mom, can we stop and get some Python?
No, we have Python at home.
Python at home…
Whitespace isn’t semantically important. Ticket closed.
That would be a very satisfying ticket closure
bro what the fuck
Looks like Python, but in an editor which with a weird TUI scrollbar
Doesn’t python need colons after if/else/for/etc. statements?
Heh, so in Python it’s possible to overload operators in the context of objects. I bet it would be possible to overload tabs to do the same thing as colons inside a context manager, but that’s pure speculation.
Perhaps I don’t understand you, but I don’t think there’s a way to override spaces in python in any way. The spaces are handled by the parser.
You can define what happens for an object when an operator is applied (like +, /, or -) so that you can obj+obj. I wonder if there’s a way to override “tab” such that it acts like a “:”, but from inside the language (this is trivial if you edit the language itself like you suggest). Thinking about it more, I’m guessing not since “:” isn’t an operator and this doesn’t have a corresponding __operator__ function.
If Python has anything like Perl’s source code filters, then anything’s up for grabs, but Perl is kind of weird in a way that Python was specifically designed not to be. Or at least Python 1 was. Things may have changed in the intervening couple of decades.
If it’s just plain overloading, then whitespace is probably off the table. Spaces, even required spaces, aren’t so much syntax as they are structure. You could argue that the curly braces of some other languages are more syntactic than Python’s whitespace, because it’s actually Python’s magic colon and the first unindented line (lack of whitespace!) that serve that specific syntactic purpose.
Examples of Perl’s source code filters range from turning a program into binary representation of the syntax tree and still having it be executable, to new syntax, to writing programs entirely in Latin or something that looks almost but not entirely unlike it, anyway.
High chance that it’s a Python programmer who is really unhappy about having to work in Java, lol
Agreed. I saw this and thought it looked beautifully passive aggressive
Ha! Now I see it - that was very funny, sir!
You can write
FortranPython in any language.
How happy I am with prettier. This is just a thing in an ancient past for me now.
Idk why but i fell in love with this and might just use it now
God
Like like python if you give the right side column thingy
I just realised why we do live coding interviews.
It would be nice and easy if we had elastic tabstops
That’s true, I wanted to port that to Kate for me to test, but I’m too dumb to port the Scala implementation to QT/KDE framework
Actually that seems great?
That would be very cool to have in a code autoformatter
Automatically enforced deterministic formatting is the best, there’s nothing that beats it. The productivity in just being able to format on save knowing that the code will be in the ideally formatted state, along with the anti-bikeshedding properties of this strategy, makes it unbeatable.
gofumpt
andgofmt
are the best. One of the reasons if I have a choice I’ll code in go. I heard rumblings that rust was working towards having rustfmt be a standard crate.Go is in a good position, yeah. JavaScript has
prettier
, which is nice. Java hasgoogle-java-format
. Python hasruff
, which is quite good. Kotlin hasktfmt
, which I believe made a mistake with their standards by not following the standard formatting guidelines for the language, but whatever. Uniform and deterministic for the win.What do you mean? rustfmt is the de facto standard and is easily run using
cargo fmt
. Most projects use it along with clippy, the standard linter.