Re:The case for dynamic, functional programming
by yakshaving_jgt on Wednesday November 23, 2022 @12:51PM
(#33722333)
There’s a significant delta between Java types and Haskell types.
Re:The case for dynamic, functional programming
by falcolas on Wednesday November 23, 2022 @08:00PM
(#33726604)
How do you know someone's a Haskell programmer? They insert themselves into every discussion about typing to point out how bad all programming languages that aren't Haskell are at types.
Re:The case for dynamic, functional programming
by yakshaving_jgt on Wednesday November 23, 2022 @08:07PM
(#33726654)
I could just as well have said OCaml. Or Idris. Or PureScript. Or Elm.
The point isn't Haskell. The point is not Java.
Re:The case for dynamic, functional programming
by rowanG077 on Wednesday November 23, 2022 @09:43PM
(#33727300)
You picked one of the best dynamic languages and compare to literally the bottom barrel of the statically typed language. And then you complain when someone points this out. This seems to me like you are acting in bad faith.
Re:The case for dynamic, functional programming
by epgui on Wednesday November 23, 2022 @11:51PM
(#33727916)
I don't think the accusation of bad faith is necessary. Don't you think it's more likely the commenter was just missing the point?
Re:The case for dynamic, functional programming
by cosmic_quanta on Wednesday November 23, 2022 @12:59PM
(#33722430)
> As someone who's worked on a huge Python program (10M+ LOC)
Holy moly. I can't imagine working on a codebase like this in Python.
I maintain several small codebases (<10k LOC) at work. Even at this size, I definitely feel the lack of type safety -- specifically, at the boundaries of logical blocks of code. When refactoring, the lack of thorough type-checking means that I need to mentally propagate my changes throughout the codebase. This is exhausting!
Re:The case for dynamic, functional programming
by harveywi on Wednesday November 23, 2022 @02:05PM
(#33723259)
> As someone who's worked on a huge Python program (10M+ LOC), type safety was the last thing on our mind when maintaining it.
This is true. Python dictionaries are extremely powerful, and they obviate the need to use elaborate types throughout the code. There is even a special syntax for making dictionaries in Python. In a code base with lots of dictionaries, type errors are a thing of the past.
Re:The case for dynamic, functional programming
by klyrs on Thursday November 24, 2022 @12:17AM
(#33728005)
Everything-a-dict results in KeyError instead of type errors. But of course, the values have a type unless it's dicts all the way down. And I really wonder what you'd be using those 10M LOC for, with that approach...
Refactoring might not have been quite as simple, but there are plenty of tools available for refactoring Python code, and we were never afraid of doing it.
Though, working on a project right now in Java, the type system isn't exactly saving us from refactoring failures, because the type system doesn't ensure that the String or Integer or <low level interface> being passed in is the right one.
Of course, I'm sure we're just "doing it wrong".