You are viewing a single thread.
View all comments
127 points

But one compiling error is Java is 7 run time errors in python.

There is a type error and you couldn’t have known it beforehand? Thanks for nothing

permalink
report
reply
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
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

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
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
10 points

With type annotations, this problem is mostly alleviated in practice, while still keeping the productivity gains of duck typing.

permalink
report
parent
reply
12 points

In my experience, Python’s type annotations are annoying as hell, because there’s no inference.

permalink
report
parent
reply
4 points

You can use mypy and/or Pydantic.

permalink
report
parent
reply
10 points

I find it’s possible to operate Python as a statically typed language if you wanted, though it takes some setup with external tooling. It wasn’t hard, but had to set up pyright, editor integration, configuration to type check strictly and along with tests, and CI.

I even find the type system to be far more powerful than how I remembered Java’s to be (though I’m not familiar with the newest Java versions).

permalink
report
parent
reply
-1 points

Ime anyone who is experienced enough knows how to avoid these Types of issues anyway (through tooling and good convention etc)

permalink
report
parent
reply
6 points

In Java you get a bunch of unexpected NullPointerExceptions instead…

permalink
report
parent
reply
1 point

usually this means you made a booboo, try catching these exceptions if it’s a possibility.

permalink
report
parent
reply
4 points

The IDE can assist you before it even becomes a problem, so even more time saved.

permalink
report
parent
reply
-2 points

Did everyone become stupid in the last 10 or so years? We used to write huge apps in Python without any type checkers or static analysis tools and never had any problems we wouldn’t have had in statically typed languages.

permalink
report
parent
reply
4 points

no, we didn’t, we made a bunch of small programs

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.4K

    Monthly active users

  • 887

    Posts

  • 9K

    Comments

Community moderators