3 ms·
Meh, this is not useful. The first thing: static typing is not static typing (yes, twice) dynamic typing is not weak typing is not strong typing. C is borderli
by tetha 17y ago
Meh, this is not useful.
The first thing: static typing is not static typing (yes, twice) dynamic typing is not weak typing is not strong typing. C is borderline static typing. Certainly, you have to say 'yes, this foo is an integer, this bar is a char' and the compiler will complain if you do foo = bar... but on the other hand, something like ((char)(void)(&foo)) will probably work (untested). I am not aware of these such possibilities in Haskell.
Furthermore, Haskell (for example) is statically typed, but I don't have to annotate everything with types, compared to, say, C, C# (even though this comparision is unfair, as Type inference in OOP-Languages requires exponential time). This is also a pretty big difference in 'static languages'. (In fact, Haskell and Python programs appear to converge to a certain common structure, which is very interesting).
The second thing: dynamic typing vs dynamic typing. What about weak typing vs strong typing? Python is dynamically typed, by Python is strongly typed, so an Integer is an Integer and remains an Integer unless told otherwise. In weakly typed languages, this is not the case. So just 'dynamic' is not useful either.
And then, the paradigms. Argh. Those hurt my eyes by now. OCaml is functional, and Haskell is functional. Haskell is pure, Ocaml is not. This is a gigantic major difference, let alone the functional subsets* of other languages. OOP? Hah. Just consider Icons inheritance vs Javas inheritance. Javas inheritance goes most specific towards least specific, overriding methods. Icon goes least specific towards most specific, giving the subclass implementor extension points where he can add further functionality. And don't even start to think about Common Lisps object orientation, or dylans, which is entirely different. Those terms, in my opinion, are far far too broad in order to describe a language well. Certainly, you might get a feeling what ML is, if I say "ML is functional", but overall, you know nothing about the code. (And don't even think about multi-paradigm languages).
So, overall: The table does not really tell anything, especially if you consider that major languages are missing. Even some toy example like faculty or fibonacci in each of these languages would tell everyone more than this.
- dkersten 17y agoStrong and weak typing isn't a very useful designation. most people take string typing as what my favorite languages have and weak typing as everything else. By the most common definition, strong typing seems to mean that you can never have implicit type casts, while with weak typing you can. Again, by common definitions, static typing is when the compiler always knows the types (either through type declarations or type inference) and dynamic typing the types are not known until runtime. Going by these definitions, C uses weak static typing. OCaml uses strong static typing. Python uses weak dynamic typing. By these definitions, haskell IS statically typed because it uses type inference, but the compiler still knows the type at compile time. Paradigms is messy because there are more paradigms that listed in the table and many more hybrids.. I guess its useful as a quick guideline, but I certainly wouldn't base.. well, anything, on this. So, in the end, I have to agree. The table is interesting and fun, but not useful.