News for hackers. Stuff that matters.
Re:Python's Type Checking Renaissance by ardy42 on Tuesday January 26, 2021 @02:04PM (#25919835)
> Contra: (some) people doing exploratory programming in the small e.g. scientists don't want to have to deal with the type checker.

Which in at least some cases means ignoring bugs. Pretty much every system I've worked on that used a language that didn't to type checking (or was too forgiving about it) has had runtime bugs because of type incompatibility or type coercion issues.

Re:Python's Type Checking Renaissance by rscho on Tuesday January 26, 2021 @02:46PM (#25920259)
> Which in at least some cases means ignoring bugs

Indeed, but simplicity is the name of the game for exploratory programming. It's difficult to explore using languages requiring a lot of ceremony.

But then, that's when the time and funding constraints come in and prevent rewriting in more type sound languages. Which is why we end up with buggy python (if speed not an issue) or buggy C (if speed is an issue).

There are alternate paths. For example, APL tries to be terse enough that you can have the whole thing on a single screen. That's another attempt at bug prevention.

For example, I do my data wrangling in J.

Re:Python's Type Checking Renaissance by jjnoakes on Tuesday January 26, 2021 @09:12PM (#25923466)
> languages requiring a lot of ceremony

Some statically-typed languages don't require a lot of ceremony.

Re:Python's Type Checking Renaissance by jshen on Tuesday January 26, 2021 @09:39PM (#25923612)
Is it a bug if it never happens? Another way to say it, would you pay money to prevent a problem you don’t have?
Re:Python's Type Checking Renaissance by ardy42 on Wednesday January 27, 2021 @09:34AM (#25928708)
> Is it a bug if it never happens? Another way to say it, would you pay money to prevent a problem you don’t have?

Let me rephrase that: Is it a bug if I don't know about it? Another way to say it, would you pay money to prevent a problem you're not (yet) aware of?

Saying the bugs "never happen" is basically saying "I always write bug-free code."

I feel languages that don't have type checking (or where it's sloppy), force developers perform semi-automated testing (i.e. unit tests to catch type issues) when they could have systematic, fully-automated testing (for type issues, at least)

Re:Python's Type Checking Renaissance by jshen on Wednesday January 27, 2021 @11:12AM (#25929996)
Right, but some people are doing data wrangling by themselves with python in a jupyter notebook. These aren’t production systems, and static type checking slows you down without adding much value.

That’s all I’m saying, the data analyst that has some edge case “bug” that never gets executed probably shouldn’t pay the upfront overhead cost of type checking.

Re:Python's Type Checking Renaissance by cheriot on Tuesday January 26, 2021 @10:14PM (#25923805)
Is having buggy, unused code lying around a good thing?
Re:Python's Type Checking Renaissance by jshen on Tuesday January 26, 2021 @10:24PM (#25923865)
It’s not always bad, and dealing with it has a cost. The cost is not always worth. It may be worth it most of the time, but not always.