3 ms·
>Your classification is based on a trivial expression involving primitive types. It's not "his classification", just his example. The classification is establ
by coldtea 9y ago
>Your classification is based on a trivial expression involving primitive types.
It's not "his classification", just his example.
The classification is established terminology in Computer Science.
>Since both will likely be represented by strings, it will return garbage, "weak" in your definition.
It's not his definition, and it's not weak in this case. Weak is not about getting garbage or not, it's about the semantics of a behavior. It could be that the result of the weak behavior is exactly what one wanted (e.g. to add a string to an SQL statement -- I might be adding together SQL statements and text about them to produce a book on SQL with my script).
In any case, the SQL statement is a string in Python, not its own type, so the result will not be weakly checked, it will be strongly checked as what it is (a string) -- Python will do what it should.
- willtim 9y ago>The classification is established terminology in Computer Science No. It is terminology used by the dynamic language communities, not by academics.
- coldtea 9y agoYeah, I guess all those papers that discuss strong and weak typing weren't written by "real" academics... For example: http://www.lucacardelli.name/Papers/TypefulProg.pdf http://www.lucacardelli.name/Papers/TypefulProg.pdf https://dl.acm.org/citation.cfm?id=97964 https://dl.acm.org/citation.cfm?id=97964 https://www.usenix.org/legacy/event/sec09/tech/full_papers/robertson.pdf https://www.usenix.org/legacy/event/sec09/tech/full_papers/r... https://dl.acm.org/citation.cfm?id=382281 https://dl.acm.org/citation.cfm?id=382281 https://ieeexplore.ieee.org/abstract/document/660187/?reload=true https://ieeexplore.ieee.org/abstract/document/660187/?reload... https://dl.acm.org/citation.cfm?id=38823 https://dl.acm.org/citation.cfm?id=38823 https://patents.google.com/patent/US7086041B2/en https://patents.google.com/patent/US7086041B2/en https://link.springer.com/chapter/10.1007/978-3-642-03359-9_2 https://link.springer.com/chapter/10.1007/978-3-642-03359-9_... https://ieeexplore.ieee.org/abstract/document/4085614/ https://ieeexplore.ieee.org/abstract/document/4085614/ https://ieeexplore.ieee.org/abstract/document/287604/ https://ieeexplore.ieee.org/abstract/document/287604/ https://dl.acm.org/citation.cfm?id=2635922 https://dl.acm.org/citation.cfm?id=2635922 https://link.springer.com/chapter/10.1007/3-540-54444-5_83 https://link.springer.com/chapter/10.1007/3-540-54444-5_83
- willtim 9y agoThat looks like a random list of papers. Which one are you claiming defines or even discusses "strong" or "weak" typing? AFAIK those terms have no real definition in type theory.
- viraptor 9y agoYou're moving goalposts. You said academics don't use the terms - you were given examples that do so. None of them need to define it - if you're interested, you can do that research. Those terms don't have definitions in type theory and that's ok. Systems defined in the type theory deal with very explicit, theoretical analysis that usually maps well only to static-strong implementations.
- willtim 9y agoYes goal posts have been moved, but not by me. Some of those papers may informally use these terms for static types, but it is certainly not to describe characteristics of dynamic languages. AFAIK, there is no classification in computer science that describes dynamic languages in this way. This has come from the dynamic language communities. None of those papers demonstrate that it is acceptable to call Python "strongly typed", in fact quite the opposite, as the technology discussed is not available in Python. Well, not yet anyway...