3 ms·
Well, I don't think that's correct -- it would make the term "type system" meaningless. In particular, lots of programs have bugs that type systems can catch.
by samth 13y ago
Well, I don't think that's correct -- it would make the term "type system" meaningless. In particular, lots of programs have bugs that type systems can catch.
For more on whether all programs have types, I wrote this: https://medium.com/p/8a3b4bedf68c https://medium.com/p/8a3b4bedf68c
- sitkack 13y agoI don't think it makes the standard definition of "type system" meaningless. Maybe what I am referring to above is a "type space". I agree with some of what you said in the medium link. Python does have a type system, structural and dynamic strong. The way the plus operator works was a mistake, Lua is superior in this regard. Take a look at the type inferencing that Shedskin and RPython in PyPy can do. If there wasn't a type system, how are those 'static strong' programs created? The programer and the program has a type system where the language may not.
- samth 13y agoWhat is a "type space"? As I say pretty explicitly in linked post, Python doesn't have a type system. Also, the term "strong" type system doesn't mean anything. Also^2, "structural" type systems are about how types are compared, and to whatever degree Python compares types, it isn't structurally. RPython is a different programming language, which is statically type. Shedskin is similar.
- sitkack 13y agohttp://stackoverflow.com/questions/2351190/static-dynamic-vs-strong-weak http://stackoverflow.com/questions/2351190/static-dynamic-vs... RPython and Shedskin as not different languages, they are subsets. All programs in RPython and Shedskin are proper python programs with the same semantics.
- samth 13y agoFirst, as the second answer points out, the terms "strong" and "weak" shouldn't be used and are confusing. Second, having a type system makes a language very different! Language subsets are different languages.
- sitkack 13y agoSo when I use quickcheck with Python or Erlang I am creating a different language? Linguistically I don't understand how a proper Shedskin program which is also a Python program with the same semantics is in another language. By that definition, the runtime system effects what the language is, but this happens after it is written, so how can it do that?
- samth 13y agoNo, quickcheck is a testing tool, not a type system. It never rejects your program. What you're saying is that Shedskin and Python have a non-empty intersection. But would the language of numbers with `+` be the "same language" as Python? It has the same relationship as Shedskin.
- sitkack 13y agoWe might run out of reply space. I made a mistake when I said quickcheck, I was thinking of the combination of Dialyzer and Typer in Erlang ( http://www.slideshare.net/konstantinvsorokin/kostis-sagonas-cool-tools-for-modern-erlang-program-developmen http://www.slideshare.net/konstantinvsorokin/kostis-sagonas-... ) I think I get what you are saying, that you have to take the totality of language in the current context. And I would have to say yes, the language of numbers with "+" is in fact Python. I think it is also Haskell and lots of other languages. If I look at a corpus of language through a slit, I will always see a subset of that language. But it doesn't stop being that language by looking at with a microscope. What happens we see a code snippet like a = 5 + b - 10 We don't know what language it is, but it doesn't matter. It is valid Ruby,Python,Lua,JavaScript, etc. Are we,me splitting hairs? I am just a layperson, I would like to fix any discrepancies in my knowledge.