Hacker News new | ask | show | jobs
by sklogic 3636 days ago
Empirical evidence is nearly impossible in this area.

On the other hand, we have a solid theory, not some "beliefs". If you want to dismiss the entire PL theory, you have to try really hard to justify such a stupid move first. The problem is, most of the dynamic proponents know next to nothing about the PL theory anyway.

2 comments

> Empirical evidence is nearly impossible in this area.

Then stop arguing as if you have evidence. It's really that simple.

Present something that is not derived from opinion and speculation and make this an argument that is not subjective.

For what it's worth, I prefer static, strong type systems and I was recently dreaming out loud about strong, static typing in erlang with a colleague. I don't confuse my opinion and speculation in what's good and not with fact, though, which is the big difference.

> If you want to dismiss the entire PL theory, you have to try really hard to justify such a stupid move first.

It's a fact that there exists no definite proof of the objective superiority of static, strong typing. I don't need to "dismiss the entire PL theory" (what a silly thing to even say; not all PL theory is concerned with types).

You've come exactly 0.0% closer to showing any kind of evidence, empirical or not, and have only speculated more (on the value of static, strong type systems and of the skill and knowledge of people who disagree with you).

> Please, do present the solid theory that is not simply derived from speculation and opinion.

What theory shows is enough to claim superiority:

1) Dynamic typing is a subset of a static typing. This thing alone is enough.

2) Static typing provides more semantic options in both compile and run time, meaning that you can do more diverse things. Also quite a strong claim for superiority.

My friend, I am one of the biggest proponents of static typing that you will find, and let me say you are talking absolute nonsense. Your argument is very poor indeed and your attitude is setting back the social cause of promoting statically typed languages.
> 1) Dynamic typing is a subset of a static typing. This thing alone is enough.

This is like saying that more syntax is better. No, cutting away from something can make it better. This argument is not at all enough to claim superiority.

(C can be considered a subset of C++. Which is better?)

> 2) Static typing provides more semantic options in both compile and run time, meaning that you can do more diverse things. Also quite a strong claim for superiority.

"More diverse things" is ill defined. Which are they and why are they a net win? This is not at all a strong claim for anything, except "There is more".

> No, cutting away from something can make it better

What?!?

You can build a dynamic type system on top of a static one. The opposite is impossible. What else is there to even talk about?

> "More diverse things" is ill defined.

It is very well defined. Static (i.e., compile time) metadata allows to infer constraints in compile time. Dynamic metadata is useless for deriving constraints. A very obvious consequence of this observation is that there will always be far more boilerplate with dynamic typing than with static.

> You can build a dynamic type system on top of a static one. The opposite is impossible. What else is there to even talk about?

We are talking about the value of different kinds of type systems and using them. Being able to build a dynamic one on top of a static one says very little about whether or not dynamic or static typing is better for actual usage. On top of this lots of languages have added gradual typing, so this idea that you cannot take a language that is not statically typed and add a type system seems misguided.

> A very obvious consequence of this observation is that there will always be far more boilerplate with dynamic typing than with static.

I hope you realize that this is not at all what reality looks like.

> We are talking about the value of different kinds of type systems and using them.

Exactly. And you're apparently suggesting that there may not be a single case where you may want static constraints. Kinda very strong position, needs very strong proofs indeed.

> gradual typing

Gradual typing IS a static typing, period.

> you cannot take a language that is not statically typed and add a type system seems misguided.

What?!?

You cannot build a gradual typing system on top of a dynamic one.

> this is not at all what reality looks like.

I can only conclude that you do not know much about the reality if you think so.

> The problem is, most of the dynamic proponents know next to nothing about the PL theory anyway.

This is either a "triumph" of theory over reality, or an insult of a whole group of people.

In short: A lot of people like dynamic typing, and can be productive in it. If the "theory" you cite says static typing is better, the "theory" needs to be changed to reflect reality. If, on the other hand, you're wrong about the theory and/or about dynamic typing enthusiasts knowing it, you should apologize.

> A lot of people like dynamic typing, and can be productive in it.

"A lot of people can be productive in it" does not establish that nothing else could be better. I can be productive in bash, but I think we all agree "stringly typed" is not as good as most other approaches to programming language design.

Even "a lot of people find themselves to be most productive in it" doesn't tell us much, as other factors could very well dominate (most significantly familiarity of language and/or paradigm, but I'm sure we can both think of plenty of other candidates).

> I can be productive in bash, but I think we all agree "stringly typed" is not as good as most other approaches to programming language design.

That depends on the language, and how central text is to what it does.

That honestly surprises me. When text is central, that sounds like when you most need to be able to organize your data without worrying about whether a delimiter might occur in some content...
Note that I'm not saying that a stringly typed language mightn't, in some cases, be the best choice. Just that it will be the best choice for reasons other than being stringly typed, and a language that allowed better organization of your data while offering similar affordances would be an improvement.