4 ms·
Programming Language Classification Table
- gdp 17y agoThis basically seems like a table to compare attributes of languages that are much less different from each other than they are from everything else. I don't think it usefully captures any attributes that people actually care about.
- ilyak 17y agoWTF is "Declarative" and how XSLT is declarative? XSLT is functional! XSLT/XPath can also be statically typed: XSLT compilers happily infer types of all expressions in their XPath.
- spectre 17y agoFunctional is a type of declarative language. http://en.wikipedia.org/wiki/Declarative_programming http://en.wikipedia.org/wiki/Declarative_programming
- ilyak 17y agoIn computer science, declarative programming is a programming paradigm that expresses the logic of a computation without describing its control flow. XSLT does describe control flow pretty explicitly; most functional languages I know, too. In other hand, languages like Java allow the VM to shuffle their control flow considerably. I vote for dropping "declarative". Call query languages query languages, functional functional.
- wlievens 17y agoIsn't Prolog declarative?
- mahmud 17y agoIt IS. Declarative != Functional, despite the huge overlap.
- ilyak 17y agoProlog - maybe. XSLT, ML, whatever - are not.
- DrJokepu 17y agoProlog is a logic programming language and as far as I know logic programming is a subset of declarative programming.
- OliverM 17y agoProlog has a logic core but also some imperative features. Programmes can be specified in a purely declarative manner.
- wlievens 17y agoYes, I was discarding the imperative features. It always struck me as odd how purists adore Prolog for its conceptual clarity, but then as soon as you want to write anything nontrivial in it, they come and tell you to place "cuts" everywhere, exposing the imperative execution order throughout the program. IMHO this is evidence of Prolog being a failure.
- deleted 17y ago[deleted]
- jrockway 17y agoMost of my Perl code is OO or functional, but neither are listed under Perl's definition. How is Smalltalk "unmanaged"? Haskell is missing. Common Lisp is missing. Scheme is missing. This chart is meaningless.
- loup-vaillant 17y agoForth, Joy (or Factor) are missing.
- cracki 17y agoI'd like to see some functional perl code.
- papaf 17y agohttp://hop.perl.plover.com/ http://hop.perl.plover.com/
- loup-vaillant 17y agoNo Haskell, no concatenative language, no distinction between explicit typing and implicit typing (one of the key differences between F# and C#)… That could use some improvement.
- rick2047 17y agoisnt groovy just java on steroids?and with no haskell or any of the Lisps this list is truely meaningless.
- jurjenh 17y agoClojure is a LISP-1
- mahmud 17y agodefined "Managed" || die "don't shoot, I am only an MCSE!";
- DrJokepu 17y agoOne correction: C# (beginning version 3) is a multiparadigm language; it supports functional programming (lambda expressions) just as much it supports imperative programming. Anything you can do in C# in an imperative style, you can do it the functional way as well.
- mhansen 17y agoJavascript not functional?!?
- dkersten 17y agoI'd say its a prototype based imperative OO language with some functional features. http://en.wikipedia.org/wiki/Functional_programming http://en.wikipedia.org/wiki/Functional_programming
- tetha 17y agoMeh, 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.