Live data from Hacker News

Diminishing returns of static typing

blog.merovius.de

461–470 of 632 posts

Re: Diminishing returns of static typing

#461

There are 3 main areas of interest in the discussion of benefits of static vs dynamic typing. - Quality (How many bugs) - Dev time (How fast to develop) - Maintainability (how easy to maintain and adapt for years, by others than the authors) The argument is often that there is no formal evidence for static typing one way or the other. Proponents of dynamic typing often argue that Quality is not demonstrably worse, wh…

4. Performance. There is software that can't be slow.

[deleted]

Re: Diminishing returns of static typing

#462
post #414

Earlier quoted context omitted.

4. Performance. There is software that can't be slow.

Incredulous that people would downvote this.

I’m in the static camp myself, but there are dynamic language JIT runtimes that meet or exceed the performance of many static languages.

Re: Diminishing returns of static typing

#463
post #415

Earlier quoted context omitted.

These are good points, but what about considering replaceability as an alternative to maintainability? I personally find dynamic languages allow for easy replacability, as there's less explicit references of types. However this is highly dependent on the system being somewhat modular I suppose.

This is basically why erlang's hot code reloading would be impossible as a general solution in a statically typed language

As long as we are here, with experienced programmers of both "sides", here's a question I've been wondering for some time: is it possible to create a haskell-like type system on an erlang-like language?

Erlang has dialyzer, which is great but it's based on optimistic typing. Hot-reloading aside, what would be the issue to creating such language? Maybe some issue with the process pids, which are quite dynamic?

Re: Diminishing returns of static typing

#464
post #419

There are 3 main areas of interest in the discussion of benefits of static vs dynamic typing. - Quality (How many bugs) - Dev time (How fast to develop) - Maintainability (how easy to maintain and adapt for years, by others than the authors) The argument is often that there is no formal evidence for static typing one way or the other. Proponents of dynamic typing often argue that Quality is not demonstrably worse, wh…

> For any code base that isn't a throwaway like a one-off script or similar, say 10 or 20 years maintenance I think one of our problems is that people have downgraded the importance of this. Much code nowadays (rightly or wrongly) is considered "disposable" - people think that the likelihood of any given piece of code they are writing as surviving more than a few years is negligible. It is a natural assumption when y…

In my experience with growing companies, even compay-critical code bases get rewritten within 3-4 years to account for flexibility that the previous strongly-typed system just can't handle. A well designed system uses strong types for the "knowns" but allows changes via dynamic types for the "unknowns". Those are the systems that last.

Re: Diminishing returns of static typing

#465
In my experience with growing companies, even business-critical code bases get rewritten within 3-4 years to account for flexibility that the previous strongly-typed system just can't handle. A well designed system uses strong types for the "knowns" but allows changes via dynamic types for the "unknowns". Those are the systems that last.

Re: Diminishing returns of static typing

#466
post #460

Earlier quoted context omitted.

This is basically why erlang's hot code reloading would be impossible as a general solution in a statically typed language

You mean like this: http://hackage.haskell.org/package/hotswap Or this: http://hackage.haskell.org/package/dyre

15 commits 4 years ago, 121 commits 8 months ago

If these things are so good why does no one use them? EVERYONE using Erlang is using the same hotswapping facility. This sort of dynamism is just fighting against the language in an environment like Haskell.

Re: Diminishing returns of static typing

#467

There are 3 main areas of interest in the discussion of benefits of static vs dynamic typing. - Quality (How many bugs) - Dev time (How fast to develop) - Maintainability (how easy to maintain and adapt for years, by others than the authors) The argument is often that there is no formal evidence for static typing one way or the other. Proponents of dynamic typing often argue that Quality is not demonstrably worse, wh…

Rather than conduct experiments I believe that existing data still holds an answer. There's one metric that hasn't been looked at. Many projects over a long period of time tend to get rewritten in a different pattern or a new language/framework. I would say dynamic languages tend to have this problem in greater proportion over say a typed language like java. This is a direct long term marker for the maintainability of a language.

Re: Diminishing returns of static typing

#468

There are 3 main areas of interest in the discussion of benefits of static vs dynamic typing. - Quality (How many bugs) - Dev time (How fast to develop) - Maintainability (how easy to maintain and adapt for years, by others than the authors) The argument is often that there is no formal evidence for static typing one way or the other. Proponents of dynamic typing often argue that Quality is not demonstrably worse, wh…

10-20 years?! Holy Cow! Other than huge software projects (like Word or Mac OS - and even then...) is there really software that still has that kind of maintenance window? I've worked for a Fortune 150 company for nearly 2 decades. There is not a single piece of software at the company that has not been rewritten from scratch (usually due to business changes) at least once every 10 years. I can't even imagine something that would still be useful after 10 years (honestly, even 5 years seems like a stretch). Just think - software written 20 years ago would have been written when the WWW was still soiling its diapers.

Re: Diminishing returns of static typing

#469
post #462
post #414

Earlier quoted context omitted.

Incredulous that people would downvote this.

I’m in the static camp myself, but there are dynamic language JIT runtimes that meet or exceed the performance of many static languages.

In special cases. It's not nearly as reliable. There are a lot of ways to get poor performance out of such JIT compilers, and writing performant code for them is a bit of a black art that varies from version to version. Just read a little about the "fun" people have had with V8 over the years.

Re: Diminishing returns of static typing

#470
post #460

Earlier quoted context omitted.

You mean like this: http://hackage.haskell.org/package/hotswap Or this: http://hackage.haskell.org/package/dyre

15 commits 4 years ago, 121 commits 8 months ago If these things are so good why does no one use them? EVERYONE using Erlang is using the same hotswapping facility. This sort of dynamism is just fighting against the language in an environment like Haskell.

Because Haskell isn't used in the same domains as Erlang, and hot patching full Haskell semantics either isn't needed, or the program is likely already using a DSL for the parts needing well defined dynamism, like the Yi editor, and so hot patching the runtime isn't needed.
Post reply on HN