Hacker News new | past | comments | ask | show | jobs | submit login

Actually, I don't think this has to do with dynamic vs static typing. It is more about strong vs weak typing, i.e. implicit type casting.

In many dynamically but strongly typed languages (like Ruby), you would still get a type mismatch when you try to add a string to a number at runtime. It's just that with static typing, you would have realized your error much earlier at compile time.




While I think you're right, my guess is that he had strong static typing in mind when he wrote the article.

Ultimately they lie on a scale. With a dynamic, strongly typed language, you still leave plenty of opportunity to make undetected mistakes. The obvious example is changing the expected type of a method argument, while only updating a subset of the call sites.


I'm not sure what he had in mind at that time, but Dijkstra was never all that enthusiastic about type theory. He thought it was a promising and worthwhile avenue, but was suspicious of it being treated as a panacea.

http://www.cs.utexas.edu/users/EWD/transcriptions/EWD12xx/EW...

"Another thing we can learn from the past is the failure of characterizations like "Computing Science is really nothing but X", where for X you may substitute your favourite discipline, such as numerical analysis, electrical engineering, automata theory, queuing theory, lambda calculus, discrete mathematics or proof theory. I mention this because of the current trend to equate computing science with constructive type theory or with category theory."


> [Dijkstra] was suspicious of [type theory] being treated as a panacea

I'd be suspicious of anything being treated as a panacea.


=) Sorry, I was being sloppy there - couldn't come up with an accurate and un-platitudinous way to characterize Dijkstra's attitude. There are other places in his writings where he's suspicious of an overemphasis on types, I think his criticisms of Ada mention it for example.

Dijkstra was a big proponent of rigorous mathematical means of establishing program correctness in general, of course, but he didn't necessary equate that with types.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: