Re:Dijkstra On the foolishness of "natural language programm...
by throw1111221 on Thursday April 03, 2025 @10:05AM
(#43569889)
Python went through a massive effort to add support for type annotations due to user demand.
Similarly, there's great demand for a typed layer on top of Javascript:
- Macromedia: (2000) ActionScript
- Google: (2006) GWT [Compiling Java to JS], and (2011) Dart
- Microsoft: (2012) Typescript
Re:Dijkstra On the foolishness of "natural language programm...
by teddyh on Thursday April 03, 2025 @01:18PM
(#43572741)
You’re talking about static typing, the opposite of which is dynamic typing. User hamstergene is talking about weak vs. strong typing, which is another thing entirely. Python has always been strongly typed, while JavaScript is weakly typed. Many early languages with dynamic types also experimented with weak typing, but this is now, as hamstergene points out, considered a bad idea, and virtually all modern languages, including Python, are strongly typed.
Re:Dijkstra On the foolishness of "natural language programm...
by teddyh on Thursday April 03, 2025 @01:14PM
(#43572693)
JavaScript is indeed weakly typed, and is widely lampooned and criticized for it¹². But Python has strong typing, and has always had it.
(Both JavaScript and Python have dynamic typing; Python’s type declarations are a form of optional static type checking.)
Do not confuse these concepts.
1. <https://www.destroyallsoftware.com/talks/wat>
2. <https://eqeq.js.org/>
Yet JavaScript and Python are the most widely used programming languages [1]. Which suggests your analysis is mistaken here.
[1] https://www.statista.com/statistics/793628/worldwide-develop...