also I just realized that Brazil did NOT make a programming language entirely in Spanish and call it “Si” and that my professor was making a joke about C… god damn it
this post is probably too nieche but I feel like Lemmy is nerdy enough that enough people will get it lol
Brazil did NOT make a programming language entirely in Spanish
Because we speak fucking portuguese
Also they did create LUA
Sim
I’ve met more than one that thinks you speak Mexican
I know, no wonder the perception that 'muricans don’t know geography is just as old
I’ll be honest, I think modern python is cool. You just need to accept that it has some limitations by design, but they mostly makes sense for its purpose.
It’s true that the type system is optional, but it gets more and more expressive with every version, it’s honestly quite cool. I wish Pylance were a bit smarter though, it sometimes fails to infer sum types in if-else statements.
After a couple large-ish personal projects I have concluded that the problem of python isn’t the language, but the users.
On the other hand, C’s design is barren. Sure, it works, it does the thing, it gives you very low level control. But there is nothing of note in the design, if not some quirks of the specifications. Being devoid of innovation is its strength and weakness.
I genuinely don’t get it.
“The C programming language is like debating a philosopher and Python is like debating someone who ate an edible”
Here “edible” is a drug. it means Python is going in all and every directions like someone high on drugs.
I get that part. I just don’t understand how the analogy relates to the programming languages. Maybe it really is just a shitty analogy from someone who doesn’t know much about either language.
This is it. OOP is a first-year CS student who thinks he’s edgy.
If you can eat it, then it’s edible.
Change my pythonic mind.
Python is my “native” programming language, it’s the first I learned, and many of my leaps in understanding of the language have resulted from thinking “Wait, Python is a smart ass. I bet it can do…”
If we’re continuing this analogy, did python or js take more drugs?
Don’t let Java try hallucinogens. It will get lost in the
public static void.Python’s on edibles. JS is on a cocktail of every psychedelic known to man and has been continuously since 1995.
C is too cold. Python is too hot. What is just right?
Visual Basic.
Python is 34 years old already. That means, someone who was already working as a programmer when Python came out would have to be about 54 years or older now.
I wonder why people still think it’s the hot new thing.
When Python came out, C was 19 years old. So Python is almost twice as old now as C was when Python came out.
I was thinking more along the line of Goldilocks and the three bears. What is the language that feels just right to you (given the obvious issues with C and Python)
Makes sense what you are saying.
When it comes to programming languages, I like to think of them as tools for a job. All languages have advantages and downsides.
For server software Java is by far the best (especially if it’s supposed to scale). For web frontends it’s TypeScript. For very simple scripts that mostly call other tools it’s bash. For more complex scripts, non-performance-critical data processing and small projects it’s Python. For microcontroller work, C. For working on more performant microcontrollers C+Lua. For tests Groovy is surprisingly helpful. For game development GDScript or whatever your chosen environment supports.
The rest is just syntax. It doesn’t really matter whether I use curly braces or indentation.
I do like the old if-endif block style, but sadly that doesn’t really exist in mainstream languages anymore. Lua is the only thing that’s kinda similar, but they only use “end”, negating the advantage of being able to easier see where the “for” ends in a sea of “ifs”.
I guess bash does something similar too, but “fi” and “esac” really break my fingers (and then they don’t even do “elihw”).
Nim. Python-esque way to write, C speed
Haskell
You know why functional programming languages don’t have side-effects?
Because nobody uses them.
I’ll hate on python (or any dynamically typed lang) as much as the next guy, but let’s not be language snobs
Why would you hate on it? It has its usecases. You won’t build an OS in Python, but I’d much rather do data processing in Python than in C
Maybe I’ll build an OS in Python just for the fun of it! Haha
You just cannot do it, I’m afraid. Python is an interpreted language, and requires de CPython library to be translated into machine code so that it can then be run, but that requires an underlying OS that makes the calls. The closest thing would be micropython, which can be run inside the Linux kernel, but that’s about it. The only thing I can think of is using a custom compiler that would generate either C/C++ or assembly code from a Python script, and then compile it using a standard C/C++/assembly compiler.
Well shoot! This is really interesting though. I’m not a programmer, but I think I understand the basics of this.
I hate on it mainly for its lack of static typing.
I tried building a HomeAssistant add-on in python, and it was not a good experience. Idk what IDE python devs usually use but VSCode did not provide much assistance.You can in fact statically type in Python. For example, defining variables:
six: int = 6 hello_world: str = "Hello World!"Or defining functions:
def foo(x: int) -> int: return x**2If you only want to use static Python, you can use the mypy static checker:
# Install mypy if you don’t have it pip install mypy # Run the checker on the file (e.g., example.py) mypy example.pyThat’s just a fancy way of commenting on the intended types, no static typing though.
Python will happily execute:
six: int = 6 six = "Hello World!"But mypy will not accept it :)
I was using that syntax, but nothing seemed to be checking it. Running an external app to get static checking done isn’t great, presumably there are extensions for common IDEs?
But the poor vscode developer experience went beyond that. I attribute it to dynamic typing because most of my frustration was with the IDE’s inability to tell me the type of a given variable, and what functions/properties were accessable on it.
I hope it’d be better on an IDE made specifically for python, although idk how many extensions I’d have to give up for it, and things like devcontainers.
What you’re describing is type hints, it’s syntactic sugar and not used at all by the interpreter.
For example, this is a “legal” statement:
foo: int = "bar"Your IDE and linter will complain, but the interpreter just chops the hints off when compiling, and it’s left with
foo = "bar"
I am currently taking a Python class and we are using PyCharm I’m not a developer, so I don’t know if it’s good yet.
i didn’t say anything negative about it, I like both languages (though python is way easier). i was just stoned and made an observation
I try to avoid python for two main reasons. While coding, white spaces. Who thought that was a good idea? While using, shared dependancies, again who thought thay was a good idea? I have to use pipx or manually make a venv otherwise python scripts start breaking each other. May as well just package it with its own dependancies from the get go.
also I just realized that Brazil did NOT make a programming language entirely in Spanish and call it “Si”
Imagine Python did this, and people would programming in Dutch!
What about philosophers who eat edibles?
C++?









