Table of Contents for Programming Languages: a survey
Python
Pros:
- Readable
- "There's only one obvious way to do it" (TOOWTDI)
- pervasive data structure protocols: sequences and map ('dict')
Tours and tutorials:
Best practices:
Popularity:
Go
Good for:
- writing internet servers (todo cite). efficient, concurrency, statically-linked executable.
Attributes:
- Compiled
- Garbage-collection
Pros:
- Compiles fast
- Simple grammar
- "Compared to other languages in the C family, its grammar is modest in size, with only 25 keywords (C99 has 37; C++11 has 84; the numbers continue to grow). More important, the grammar is regular and therefore easy to parse (mostly; there are a couple of quirks we might have fixed but didn't discover early enough)." -- https://talks.golang.org/2012/splash.article
- "Unlike C and Java and especially C++, Go can be parsed without type information or a symbol table; there is no type-specific context" -- https://talks.golang.org/2012/splash.article
- Separate compilation (todo)
- Gofmt
- Produces a single statically-linked executable.
- Structurally typed interfaces
- Relatively efficient memory usage compared to many high-level languages
Cons:
- Lack of fine-grained control over memory management
- Bills itself as a 'systems programming language' however does not allow the programmer fine-grained control over memory management, instead providing mandatory garbage collection. Many commentators who use C++ instead of Go say that the lack of fine-grained control over memory management is what is keeping them from using Go instead of C++, and prevent Go from being a true 'systems programming language' (see various comments at https://news.ycombinator.com/item?id=6417859 ).
- No generics
- No dynamic linking
- No exceptions (more of a best practice than a language constraint though)
- Compiler error to have unused variables and imports -- this can make it cumbersome to experiment and debug, as you have to comment out unused stuff
- No scheduler preemption as of this writing (Aug 2013), but they're working on it
Tours and tutorials:
Process:
Retrospectives:
Opinions:
Best practices:
- Throwing exceptions across module boundaries is discouraged (Go has an exception-like mechanism involving panic/defer/recover, although they call them 'panics' instead of 'exceptions'). Instead, Go encourages you to return an error code, in an effort to encourage program correctness by making error handling explicit (see http://golang.org/doc/faq#exceptions ).
- Name single-method interfaces with words ending in 'er'
'Go' is hard to search for on the web so the tag 'golang' is often used.
Popularity:
- Beloved by those who use it, but not popular
Erlang
Pros:
- Hot code reloading; can literally reload code without dropping a TCP connection
- Per-process heaps for robustness
Cons:
- Said to be bad at efficient text processing (todo cite)
- Prolog-like syntax is disliked by some
Java
Attributes:
Pros:
Cons:
- memory hog
- long initial startup time
JVM Pros:
- runtime profiling and monitoring tools, runtime bytecode instrumentation
- dynamic class loading
JVM Cons:
- long startup time
- high memory usage
- garbage collection with nondeterministic pauses
Best practices:
Retrospectives and whitepapers:
Opinions:
- "uses abstractions on the same level as Java (higher than C, lower than Clojure), designed as a blue-collar language, emphasizes readability (at the expense of verbosity), and generally avoids low-level bit-diddling as well as high-level meta-programming tricks." -- https://news.ycombinator.com/item?id=7023390
- "Java is a blue collar language. It’s not PhD? thesis material but a language for a job. Java feels very familiar to many different programmers because I had a very strong tendency to prefer things that had been used a lot over things that just sounded like a good idea." -- James Gosling, http://dfjug.org/thefeelofjava.pdf
Popularity:
- Popular, but also disliked by many
Lua
Pros:
- embeddable
- really small binary (less than 0.2MB on GNU/Linux as of this writing; by comparison, Python is about 3 MB)
- Dynamic typing
- Automatic memory management
- Higher-order functions
Process:
Retrospectives and whitepapers:
Influences: SOL, DEL, "Lua 1.0 was designed in such a way that its object constructors, being then slightly different from the current light and flexible style, incorporated the data-description syntax of SOL (hence the name Lua – sol is Portuguese for sun; lua is moon). Lua syntax for control structures was mostly borrowed from Modula (if, while, repeat/until), but also had taken influence from CLU (multiple assignments and multiple returns from function calls, as a simpler alternative to reference parameters or explicit pointers), C++ ("neat idea of allowing a local variable to be declared only where we need it"[3]), SNOBOL and AWK (associative arrays). In an article published in Dr. Dobb's Journal, Lua's creators also state that LISP and Scheme with their single, ubiquitous data structure mechanism (the list) were a major influence on their decision to develop the table as the primary data structure of Lua.[5] Lua semantics have been increasingly influenced by Scheme over time,[3] especially with the introduction of anonymous functions and full lexical scoping." -- https://en.wikipedia.org/wiki/Lua_%28programming_language%29#History
Popularity:
- Beloved by those who use it, but not popular
Perl
Pros:
- "There's more than one way to do it" (TMTOWTDI)
- "Easy things should be easy and hard things should be possible"
Perl 6 design docs:
C#
people: Anders Hejlsberg
Popularity:
- Moderately popular and moderately beloved
Smalltalk
attributes:
big ideas: "We had two ideas, really. One of them we got from Lisp: late binding (..If you’re using early-binding languages as most people do, rather than late-binding languages, then you really start getting locked in to stuff that you’ve already done. You can’t reformulate things that easily...). The other one was the idea of objects." -- Alan Kay, http://queue.acm.org/detail.cfm?id=1039523
people: Alan Kay
influences: "Sketchpad, Simula, the design for the ARPAnet, the Burroughs B5000, and my background in Biology and Mathematics" -- Alan Kay, http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay_oop_en
retrospectives: http://gagne.homedns.org/~tgagne/contrib/EarlyHistoryST.html , http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay_oop_en
some notes on this history of smalltalk are in the middle of:
http://web.augsburg.edu/~crockett/210/210%20Lab%20Set%204/Reed_OOP_Epistemology.pdf
Self
Retrospectives:
Io
Whitepaper and intro/guide:
Pros:
- simple
- embeddable
- "highly dynamic and introspective"
- coroutines and async i/o
- all values are objects
- late binding
- all code is expressions
- "code is a runtime inspectable / modifiable tree"
- "all expressions are made up of dynamic message sends"
- "Execution contexts themselves are objects"
- "activatable objects such as methods/blocks and functions are unified into blocks with assignable scope"
Other attributes:
Influenced by: Smalltalk, Self, NewtonScript?, Ac1, Lisp, Lua
Ruby
Retrospectives:
PHP
Javascript
C#
todo: i'm not really sure if everything in this file is actually imperative, memory-managed, and oop! check!