Earlier quoted context omitted.
Name one of those abstractions that is missing in Python.
You joking? - strong typing - real concurrency (heaven forbid you want a background task without having to spool up an external message queue and worker) - immutability - limitations in error handling (sort of just typing really) - limitations in nullability (also typing) - memory layout is usually hidden or abstracted away - no actual private methods or classes That's far from a complete list, but maybe you're takin…
If AI writes your code, why use Python?
861–870 of 1001 posts
Re: If AI writes your code, why use Python?
#862Re: If AI writes your code, why use Python?
#863Earlier quoted context omitted.
> The reading experience is abhorrent Nothing you read in the browser can provide ultimately great and hands-down the best reading experience equally for everybody - the modern web model is inherently at odds with that. A plain HTML page with no CSS is a near-perfect reading experience. The problem is that almost nobody ships that, because the web also became a publishing platform where authors compete for attention.…
do you use emacs?
Re: If AI writes your code, why use Python?
#864Re: If AI writes your code, why use Python?
#865Earlier quoted context omitted.
I think most people agree with you -- that's why. Also because I'd say most programmers don't care much about maintainability or quality. I personally find that AI writes better Scala than Python.
Before AI, I used to say types reduce quality by wasting dev time that could've been spent on testing. They may also encourage overly complex code. With AI, I don't know. If we're forced to use types, the AI does that work for me, but that added verbosity can't be good for it.
* someone assumed duck typing where it wasn't or the inverse. Or changed the assumed interface of a duck.
* somewhere doesn't handle None properly even though it's a valid agrument.
* making sure every function properly checked that the input parameters were valid and generated a meaningful error message
* making sure side effects of the ducks and the meta-bs didn't break other things
AKA all type related nonsense.
With go, and even more-so rust, the time the compiler saves me by obviating all that type related testing is far larger than the time spend dealing with the type related testing. Even when you factor in the extra time twiddling with types adds to the coding. And don't get me started with the whole "deal with type bullshit in dynamic languages" mess that occurs when a bug slips through into prod....
Re: If AI writes your code, why use Python?
#866Re: If AI writes your code, why use Python?
#867Earlier quoted context omitted.
> Algorithms written in "pseudo-code", aka a higher level language without type information, are far more readable to a human, and thus likely an LLM too. What’s the basis of this claim? There are many many more lines of code LLM’s are trained versus pseudo-code. Also I agree, anecdotally the self-correction is key benefit from static types. If there is a mistake, it is caught at compile time and not at runtime.
It seems clear to me from first principles. Humans are trained on human language. LLMs are trained on human language. Thus something that is easier for a human to understand is likely easier for an LLM to understand. That higher level language with well named variables reads more comprehensibly than code:VERB with:PREPOSITION types:NOUN, intermixed:ADJECTIVE, stems:VERB from:PREPOSITION first:ADJECTIVE principles:NOU…
Re: If AI writes your code, why use Python?
#868Earlier quoted context omitted.
I really wanted to like Mojo, but the more I read about it, the more it really wasn't Python even though, starting out, that was a major claim to fame. There is an excellent chance it will be awesome stuff. But they did themselves a huge disservice with the initial claim about trying to be Python compatible.
There is still Python Interop., which will be nice. Even if the syntax is not a one-to-one, it's better than nothing. Though, I do agree "100% compatible syntax" was an overzealous promise.
But then there's also the semantics. When something that looks like Python parameter passing actually passes a copy of the argument, it's not really Python at all.
What's even more interesting? disconcerting? is that Mojo has two different ways of defining functions, and the one that most resembles Python already has this change.
I'm all for new languages borrowing the best concepts from previous languages, and distancing themselves from them a bit.
For example, this was discussed here recently: https://github.com/spylang/spy
It has been obvious for a couple of decades that CPython is itself a Schelling point and that anything promising full Python compatibility can't keep up and will eventually die, so (to me) this bold unreachable claim seems like an unforced error on the part of the Mojo team.
> Even if the syntax is not a one-to-one, it's better than nothing.
To some extent this may be true. But back in the day, when I was working on projects where I would use multiple languages throughout the day, the cost of switching between languages actually seemed lower when there was more distance between the languages, so...
> There is still Python Interop., which will be nice.
Interop between Python and not-quite-Python will be valuable, sure, but it would be even nicer if the language had enough good facilities that people didn't need to continually exit it.
Time will tell.
Re: If AI writes your code, why use Python?
#869Earlier quoted context omitted.
I never really understood what exactly is so readable about python. I've been developing in Python for 8 years now, and before that I was a C# developer, and I don't find Python to be that more readable. Sure there's less ceremony, and yes, you can have your project going with just a single file, but other than that...?
The "other than that" is whitespace, not brackets. Whether that's a big deal is up to you, but the carry on effect of that is that the code is indented the way the control flow interprets it, so there are no bugs from misplaced braces. (Plenty of other bugs for other reasons, unfortunately.)
Also, good automatic formatters (gofmt, rustfmt, etc) also indent along control flow lines, so without the braces you just changed a syntax error into a "hmm, this is acting really strangely" bug-hunt by using python.
Re: If AI writes your code, why use Python?
#870Earlier quoted context omitted.
Also, every single interpreter error has an entire corpus of StackOverflow-esque fix suggestions alongside it, and the model has been fine-tuned to minimize such errors on the first try. This hasn't been done for more obscure languages. You'll likely take more turns, on average, to get a working output, even if your problem is fully verifiable via test input/outputs - and if it's not verifiable, you don't want the "a…
There is no "entire corpus of StackOverflow-esque fix suggestions" about anything which is newer than a few years. I'm using cutting edge Android frameworks all the time. Yet, LLMs fix problems even when Google/Kagi has zero answers, which happens more often than not. We are way over this requirement. I especially found that there is no difference between languages based on that. All generated code's architecture is…
As you noted, of course, this doesn't apply to architecture. But that's also why I try to make sessions as turn-efficient as possible - you need every bit of context to get it to solve its own architectural rabbit holes.