24
Best C# IDE/Compiler for Linux?
(sh.itjust.works)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
Oh, they are not at all. Equating complex data structures with user-defined data structures (in the form of classes and fields and whatnot), and using the latter as the primary method of storing and working with data (so that you're constantly having to bring into your mental scope a bunch of different classes and how they need to interact), is 100% a C++ type of program structure. It's pretty unusual in my experience in Python. Or, I mean, it's perfectly common, but it's not primary in the same universal way that it is in C++ and derivatives. It gets to exist as its own useful thing without being the only way. That's what I am trying to say.
What does that even mean?
How do you define that in Python? Just a
dict[str, Any]
?You define it in exactly the same way you just did. Completely fine, you have to do it for lots of things. It's nice that Python can do that too.
Now, I'll grab a random snippet of code from some random file from my source dir:
You can see some classes in use, which again is fine. But you also see inline instantiation of some reply JSON, a database returning a list of post_reply_id values without needing a special interface definition for returning multiple values, lots and lots of cognitive and computational load per line of code that's being saved because the language features are saving people the heavy lifting of depending on user-defined classes for everything. It means you don't have as many adventures through the code where you're trying to modify a user-defined interface class, you don't need as much strong typing, that kind of thing.
I would bet heavily that a lot of the things that are happening in that short little space of code, would need specific classes to get them done if the same project were getting implemented in some C++-derived language. Maybe not, I just grabbed a random segment of code instead of trying especially hard to find my perfect example to prove my point.
It is fine, there are significant weaknesses to Python too, I'm not trying to say "yay python it's better for everything," anything like that. I'm just saying that if you don't get familiar with at least some language that does things more that way, and instead get solely accustomed to just user-defined classes or templates for every information exchange or functional definition, then you'll be missing out on a good paradigm for thinking about programming. That's all.
FWIW Here's similar go code (converted by a llm).
You can create in-line data structures AND be a properly typed language.
"It's nice that Python can do that too."
Ugh.
Never argue with a pythonista.
Dude you were the one that asked the fucking question lol
And have regretted it.