You are viewing a single thread.
View all comments View context
50 points
*

I will confess that I get a sense of psychological comfort from strict typing, even though everyone agrees Python is faster for a quick hack. I usually go with Haskell for quick stuff.

permalink
report
parent
reply
29 points

And then the quick hack gets a permanent solution and the next employee has to fight trough the spagetti.

permalink
report
parent
reply
9 points

sounds like not my problem

permalink
report
parent
reply
3 points

You will find yourself being that next person when you haven’t touched the code for a week and come back to add something and are like wtf.

permalink
report
parent
reply
5 points

This may be true, but it’s equally true in any programming language, so not really relevant.

permalink
report
parent
reply
3 points

I’d guess it’s less true for something statically typed, just because that reduces the ways it can be unintuitive.

permalink
report
parent
reply
3 points

Such is life.

permalink
report
parent
reply
24 points

I find Python is quick for the first 30 minutes. If you need any kind of libraries, or assistance from an IDE, or a distribution build, or you’re more familiar with another language, then it isn’t quicker.

permalink
report
parent
reply
15 points

If you need any kind of libraries

PyPI has a huge selection of libraries

assistance from an IDE

PyCharm a super powerful IDE, VSCode has tons of Python extensions that L rival PyCharm’s functionality, lots of other IDEs have decent python support

or a distribution build

Not sure exactly what you mean by this

or you’re more familiar with another language

Yeah this can be said about any language. “You’re quickest in the language you’re most familiar with”. That’s basically a tautology.

permalink
report
parent
reply
21 points

Oh boy, you really wanna talk about it?

PyPI has a huge selection of libraries

It does, but the lack of static typing means it is more difficult to interact with foreign code (correctly).

When I pull in a library in a JVM language or Rust etc., I quickly glance at the documentation to get a rough idea of the entrypoint for the library.
Like, let’s say I want to create a .tar file, then the short “Writing an archive” example tells me all I need to know to get started: https://crates.io/crates/tar

If I need to find out more, like how to add a directory, then having the tar Builder initialized is enough for me to just ask my code completion. It will tell me the other available functions + their documentation + what parameters they accept.
If I make a mistake, the compiler will immediately tell me.

In Python, my experience was completely different. Pulling in a library often meant genuinely reading through its documentation to figure out how to call it, because the auto-completion was always unreliable at best.
Some libraries’ functions wouldn’t even tell you what types you’re allowed to feed into them, nor what type they return, and not even even diving into their code would help, because they just never had to actually specify it.

PyCharm a super powerful IDE, VSCode has tons of Python extensions that L rival PyCharm’s functionality, lots of other IDEs have decent python support

Yes, PyCharm is a super powerful IDE when compared to Nodepad++. But it’s a trashcan fire compared to IntelliJ or even the much younger RustRover.

Half the time it can’t assist you, because no one knows what types your code even has at that point.
The other half of the time, it can’t assist you, because, for whatever reason, the Python interpreter configured in it can’t resolve the imports.
And the third half of the time, it can’t assist you, because of what I already mentioned above, that the libraries you use just don’t specify types.

These are problems I’ve encountered when working on a larger project with multiple sub-components. It cost us so much time and eventually seemed to just be impossible to fix, so I ended up coding in a plain text editor, because at least that wouldn’t constantly color everything red despite there being no errors.

These problems are lessened for smaller projects, but in that case, you also don’t need assistance from an IDE.

or a distribution build

Not sure exactly what you mean by this

What I mean by that is that Python tooling is terrible. There’s five different ways to do everything, which you have to decide between, and in the end, they all have weird limitations (which is probably why four others exist).

or you’re more familiar with another language

Yeah this can be said about any language. “You’re quickest in the language you’re most familiar with”. That’s basically a tautology.

Yes. That is all I wanted to say by that. People just often claim that Python is a great prototyping language, to the point where the guy I was responding to, felt they’re doing the wrong thing by using the familiar tool instead. I’m telling them, they’re not.

permalink
report
parent
reply
2 points

I won’t feel bad about it then, lol. At least not until I’m collabing on something and they want to use Python.

permalink
report
parent
reply
4 points

I wrote my bachelor’s thesis in Haskell and have never touched it again.

permalink
report
parent
reply
4 points

A lot of people feel that way. If I need to generate a set of numbers or a certain string, though, it’s pretty easy to punch out a one-liner in GHCi, and that’s usually my use case.

permalink
report
parent
reply
3 points

When did baccalaureate theses become a thing?

permalink
report
parent
reply
7 points

I don’t know if you’re trying to be funny or your autocorrect is, but in Germany, when they switched from diploma to the bachelor/master system, both bachelor and master come with a theses. Many people leave with a bachelor, especially in computer science, so that might be why. Don’t know about other countries

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 5.3K

    Monthly active users

  • 884

    Posts

  • 8.9K

    Comments

Community moderators