There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

marcos ,

None of that is “Python”. You want to learn a language and automatically know everything there is to know using Math?

cbazero ,

Dynamic typing, special and unique syntax for every language feature, interpreter intrinsics

tux0r ,
@tux0r@feddit.org avatar

Dynamic typing is the source of very amazing errors, see JavaScript.

Brahvim ,
@Brahvim@lemmy.kde.social avatar

[object Object]

!Reddit moment.!<

sus ,

I think the problems there are exacerbated a lot by over-eager type coercion and other crappy design decisions inherited from almost 30 years ago

barsoap ,

Yep lua and lisp/scheme are also unityped and not even close to as broken. All are remarkably similar languages, theory-wise.

…also something something Guido not getting tail call elimination and people sending him copies of the wizard book. It’s been a while.

(And, yes, lua does proper tail calls).

joyjoy ,

Operator overloads, descriptor protocol, decorators

xmunk ,

Operator overloads are excellent for readable code when used well - I object to their inclusion on this list.

joyjoy ,

As long as you don’t have to implement it yourself.

calcopiritus ,

The mistake was choosing a language, and afterwards searching for a use to the language you just learned.

Bougie_Birdie ,
@Bougie_Birdie@lemmy.blahaj.zone avatar

A hammer is beginner friendly, but learning to use a hammer doesn’t necessarily mean you’re ready to build a house with it.

tux0r ,
@tux0r@feddit.org avatar

For all of those, Lisp is the more logical choice. Plus, whitespace as syntax is the worst possible design decision.

BombOmOm ,
@BombOmOm@lemmy.world avatar

Ok, but what if an entire programming language is made of whitespace?

en.wikipedia.org/…/Whitespace_(programming_langua…

tux0r ,
@tux0r@feddit.org avatar

Still easier to refactor than Python. ;-)

Scoopta ,
@Scoopta@programming.dev avatar

That syntax decision is single handedly why I avoid python if possible

MonkderVierte ,

For me it’s dependency hell. Almost as bad as npm.

Scoopta ,
@Scoopta@programming.dev avatar

…is it truly that bad? npm is the reason I don’t even install software based on node on my machines… python doesn’t seem nearly as bad by comparison? (I run it, just don’t like to write it) Maybe it’s worse than I realize

MajorHavoc , (edited )

Lisp is the more logical choice.

Relevant XKCD. Python has replaced Perl, but things have otherwise changed quite little.

tux0r ,
@tux0r@feddit.org avatar

I still write more Perl than Python these days.

MajorHavoc ,

I’m kinda jealous. I don’t miss maintaining production Perl code, but Perl was more fun to code in.

tux0r ,
@tux0r@feddit.org avatar

Feel free, it’s still out there!

vk6flab , (edited )
@vk6flab@lemmy.radio avatar

Perl is the only language that looks just as incomprehensible before and after a rot13 transformation.

Python on the other hand is the only language that will cause your application to stop working because you mixed up tabs and spaces, even though it looks perfectly fine on your scr.

And lisp is hard to say if you have one.

Edit: aa -> after a

MajorHavoc ,

Perl is the only language that looks just as incomprehensible before and aa rot13 transformation.

Lol. You’re not wrong.

Overspark ,

It is absolutely fine to mix tabs and spaces in Python, as long as you are consistent about it. It’s not recommended though, as it’s easy to mess up if you’re not paying attention. Most IDE’s will convert tabs to spaces anyway so it’s a bit of a non-issue.

Aatube ,

I mean, their goal was readability, and at least they're trying new things.

joyjoy , (edited )

You say that, then use a language that allows you to do this (it’s not lisp)


<span style="font-weight:bold;color:#a71d5d;">if </span><span style="color:#323232;">(foo);
</span><span style="color:#323232;">{
</span><span style="color:#323232;">  bar();
</span><span style="color:#323232;">}
</span>
tux0r , (edited )
@tux0r@feddit.org avatar

You can make embarrassing mistakes in virtually any programming language that’s not too esoteric.

When I still used Python for prototyping (today, I usually use Go for that), it happened much too often that I did this:


<span style="font-weight:bold;color:#a71d5d;">if </span><span style="color:#323232;">foo:
</span><span style="color:#323232;">    bar()
</span><span style="color:#323232;">   foobar() </span><span style="font-style:italic;color:#969896;"># syntax error
</span>

In Lisp, however, both errors are much harder to make (not even considering GNU Emacs’s superb auto-indentation - which is what most Lispers use these days, as far as I know):


<span style="color:#323232;">(</span><span style="font-weight:bold;color:#a71d5d;">when</span><span style="color:#323232;"> foo)  </span><span style="font-style:italic;color:#969896;">;; <- obvious!
</span><span style="color:#323232;">    (bar)</span><span style="background-color:#f5f5f5;font-weight:bold;color:#b52a1d;">)</span><span style="color:#323232;">
</span>

<span style="color:#323232;">(</span><span style="font-weight:bold;color:#a71d5d;">when</span><span style="color:#323232;"> foo
</span><span style="color:#323232;">    (bar)
</span><span style="color:#323232;">          (foobar)  </span><span style="font-style:italic;color:#969896;">;; <- still valid
</span><span style="color:#323232;">(quux))  </span><span style="font-style:italic;color:#969896;">;; <- also still valid
</span>
UndercoverUlrikHD ,

The sea should be marked as C considering that’s what you’ll discover when you get deep into it.

_stranger_ , (edited )

en.m.wikipedia.org/wiki/PyPy

Their greatest mistake was not naming it Ouroboros.

BatmanAoD ,

The reason C becomes relevant to Python users isn’t typically because the interpreter is written in C, but because so many important libraries (especially numpy) are implemented in C.

_stranger_ ,

Oh for sure, and some of those are not ok with swapping the interpreter out 🤣

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • lifeLocal
  • goranko
  • All magazines