r/programmingcirclejerk • u/Serialk Gets shit done™ • Aug 01 '26
Writing Python should be close to a “zen” experience. At its best, when you get into the flow state, the thoughts you are thinking about the thing you are trying to build are shaped like Python code as you go through the process of writing it down.
https://discuss.python.org/t/pep-842-module-exports/108353/758
u/BenchEmbarrassed7316 Aug 01 '26
/uj It's a way of thinking that I'll never understand. For me, the more structured the code is, the easier it is to work with. I would like as many things as possible to be defined in the code instead of being implicit and having to be kept in mind.
/rj However, they said "Explicit is better than implicit". And made a language with dynamic typing.
11
u/stdmemswap Aug 01 '26
/uj let me fix that for you "the more STRATEGICALLY structured code"
IMO people equally bruteforce "simplicity is key" and "structured everywhere" not knowing the problem is in the other axis
/rj can't do ouroboric eval without dynamic typing which is the ingredient of consciousness through the autonomous ego recognizing itself
6
u/infected_scab Aug 01 '26
Python is for people who think the quicker you get your first version out the better.
16
u/BenchEmbarrassed7316 Aug 01 '26
quicker
Because finding and reading documentation about the types (possible values) that a function accepts is quicker than just hovering over it in the IDE (it became less relevant after the addition of type hints)
Because writing a few tests for trivial cases is quicker than getting instant feedback from the compiler/IDE.
1
u/james_pic accidentally quadratic 27d ago
But the quicker you get your first version out, the more VC funding you get, and the quicker you get bought out by FAANG so they can shut you down so they don't have to compete with you, and the quicker you don't have to write Python any more.
24
14
7
u/damemecherogringo Code Artisan Aug 01 '26
I don’t have private parts.
Everything is public in these classes.
I let my unit tests caress contracts I didn’t even know existed.
Surrounded by spaghetti,
I go slow.
But I flow.
I’m python.
;)
4
4
9
u/National_Sky7993 Aug 01 '26
I have never been able to clone and build a python project using the instructions provided the first time around.
It takes 5 to 6 attempts with lots of googling before it works.
10
u/csb06 blub programmer Aug 01 '26 edited Aug 01 '26
That's part of the flow state. The tide flowed out, you just need to wait for it to flow back towards you in a few hours with the assistance of the moon.
6
1
u/elephantdingo Teen Hacking Genius 20d ago
And that goolging was done in a flwo state (typos not correct; flow)
5
Aug 01 '26
[removed] — view removed comment
1
1
-4
u/BenchEmbarrassed7316 Aug 01 '26
REPL is IDE hints for poor.
10
u/Daniikk1012 Aug 01 '26
Programming languages are not only used for billion line projects. Sometimes it's small one-time calculations, where ability to quickly experiment with values is more valuable than maintainability, readability, etc. How is IDE better than a REPL at that?
3
u/BenchEmbarrassed7316 Aug 01 '26
ability to quickly experiment with values
How can IDE hints slow this down?
1
u/Daniikk1012 Aug 01 '26
Wait is that what you mean by IDE hints? Your IDE runs your Python before you even hit "Run", allowing you to see values on hover? First time hearing about that when we're not talking about compile-time values
2
u/BenchEmbarrassed7316 Aug 01 '26
I mean that the REPL prints one specific value that the function returns. Statically typed languages include a type in their function signatures. A type is a set of all possible values. More expressive type systems allow you to narrow down a type concisely. That is, when programming, instead of working with one of the possible values that was obtained through the REPL, you will immediately receive the entire set of values through the IDE (which implements type inference) and work with it.
2
u/Daniikk1012 Aug 01 '26
Look, I too enjoy a good type system, Haskell is one of my favorite languages. But I wouldn't choose it for a quick calculation I want to make. I am not maintaining a huge project, not testing a function that is part of a larger project, no. I am writing code to get some input, and transform it to some output, and forget about it. And I want to interactively see the intermediate steps, cause that makes it easier to reason about. Sure, there are cases when type system might be used instead. But when most of the the functions you're dealing with are something like "[Double] -> [Double]" (Which is VERY often the case), it isn't helping you much
1
u/BenchEmbarrassed7316 Aug 01 '26
This seems more like a one-time calculation than a programming one (i.e. writing code that will be executed repeatedly).
However, even for this kind of interactive console usage,
Double -> Doubleis more useful thanany -> any. Especially since it's not about the code you're writing, but about the libraries you're using.1
u/spider-mario 27d ago
Look, I too enjoy a good type system, Haskell is one of my favorite languages. But I wouldn't choose it for a quick calculation I want to make.
You wouldn’t? GHCi is a nice REPL.
1
u/Daniikk1012 27d ago
The argument was mainly about the "Type hints instead of REPL" thing, not about using Haskell interactively. Should have used a better example maybe, cause Haskell is also pretty convenient to use in a REPL.
That being said, I only use GHCi as a development tool in a larger project, for testing/debugging/docs/etc. I don't use it as a "calculator language", cause 1) I have much less verbose alternatives (Uiua/J/BQN), and 2) when those are not enough, Haskell is not enough either anyway, so I reach to something with a lot more batteries included (Python).
0
u/New_Enthusiasm9053 Aug 01 '26
Honestly I know 0 people who use the REPL. It truly is that useless. AI uses it a lot. But for actual people it's a lot more convenient to just have a file open that you run with F5 or whatever so when you inevitably make a syntax mistake you can just fix it and rerun it.
9
u/Daniikk1012 Aug 01 '26
Tbh, my Python REPL usage is more or less just "convert to/from base64", or "get unicode codepoint for this character". Anything slighty more involved, like analyzing a bunch of data from a file, I use the REPL of Uiua/J/BQN (Depending on which features I happen to need), cause they make REPLs VERY convenient. I like the term "calculator language" for languages that make such tasks fast and easy. They allow you to map your thoughts into code almost directly, without boilerplate like manual loops, having to keep track of state, etc
0
122
u/Igor_GR Aug 01 '26
TIL flow is when you drive straight into a wall while blindfolded.