Follow

Clear and readable Python code:
x * y
You can't tell what it does, can you?

· · Mastodon Twitter Crossposter · 1 · 0 · 0

@pbx @CIAvash
👍
The advantage on one side (not to fix the variable to a type) opens up plenty of fun in #python

@pbx I was just making a joke that you won't know what the code does unless you know the type of x. I don't know Python and when I saw `*` used on a string variable I was surprised. And Python claims to go for clear and explicit code.
I am against using one operator doing multiple things, specially if there is no difference in infix/prefix...
The same goes for `+` operator in many languages, used both for adding numbers and concatenating strings.
That's one of the reasons I like Raku.

@CIAvash @pbx #Rakulang is fantastic. The more Raku I learn, the more Raku I want to write.

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!