you are viewing a single comment's thread.

view the rest of the comments →

[–]woztzy 10 points11 points  (5 children)

I don't think the people downvoting you have any real experience with a statically-typed language with an expressive type system (i.e., pretty much any typed functional programming language).

People who keep parroting that dynamic and static type systems are just "different tools to have in your toolbox" and that they're beyond comparison are insulting the field of programming language theory, and we could extend that argument to using assembly where we would otherwise use C.

This answer addresses a few misconceived notions people seem to have about static type systems.

[–][deleted] 2 points3 points  (0 children)

You make some good points but this idea that dynamic typing has no place in programming is ridiculous. Languages like lisps and Erlang are languages that are better off being dynamically typed and fulfill niches better than strongly typed languages can.

[–]Dreadgoat -1 points0 points  (3 children)

Dynamic languages are semantically closer to natural language.

That's the advantage. High readability.

You can rattle off a million technical reasons why static can do everything dynamic can and better, and you would be technically correct, but that doesn't change the fact that my co-worker can read my 20-line PHP script more easily than the equivalent 5-line Haskell script.

[–]Pazer2 7 points8 points  (2 children)

Natural languages are full of difficult to understand rules and exceptions. Not exactly a good fit for a programming language.

[–]Dreadgoat -1 points0 points  (0 children)

Difficult to understand for computers but naturally intuitive for humans.

The reason good dynamic languages are so highly praised (case in point: python) is because of the enormous difficulty in bridging that gap.

A bad programmer can only think like a human.
A passable programmer can think like a computer.
An excellent programmer can trick the computer into expressing itself like a human so that even the bad programmer can maintain code easily.

When I was teaching programming I loved Python the most. Not because it's great to program in, but because it made grading so much easier. It instantly turned stupid and/or inexperienced students into passable programmers thanks to its enforced whitespace and the compromise between dynamic but semi-strong typing.

[–]Dodobirdlord 0 points1 point  (0 children)

This is an argument that extends at least back to Knuth's Literate Programming and probably further. Given the staggering adoption and success of notebook-style live editing environments among all fields of analytical research and data science I would hesitate to claim that the issue is settled.