Programming Languages: Thinking in Code

What precicely do we need out of a programming language? Steve Yegge has a list:

Here’s a short list of programming-language features that have become ad-hoc standards that everyone expects:

  1. Object-literal syntax for arrays and hashes
  2. Array slicing and other intelligent collection operators
  3. Perl 5 compatible regular expression literals
  4. Destructuring bind (e.g. x, y = returnTwoValues())
  5. Function literals and first-class, non-broken closures
  6. Standard OOP with classes, instances, interfaces, polymorphism, etc.
  7. Visibility quantifiers (public/private/protected)
  8. Iterators and generators
  9. List comprehensions
  10. Namespaces and packages
  11. Cross-platform GUI
  12. Operator overloading
  13. Keyword and rest parameters
  14. First-class parser and AST support
  15. Static typing and duck typing
  16. Type expressions and statically checkable semantics
  17. Solid string and collection libraries
  18. Strings and streams act like collections

Visual Studio missed the cross platform bit (Unless there’s a way for writing Linux readable C++ that no one has told me about). 

A language is not simply a series of sematic rules that work together to produce meaningful output ( written or spoken), but also the way we think. When I speak english, I think english. When I’m speaking itallian, I think itallian.

A programming language is the same. Progammers need to be able to think in a given language and also anticipate the reaction of the complier. A well thought out subroutine, is far better than one riddled with badly, though workable, code.

Thinking in code is important. (Its also a valid reason to say your’re working). When one thinks in code, the output becomes automatic. The trick is learning your chosen language(s) thoughly enough.

 Which brings me to the subject of switching languages. Do we want a new porgamming language to learn every 18-24 months? Can we even sustain that sort of learning curve?

At the end of the day, the Next Big Language (NBL as steve says) will have to be worth the effort to switch. BEcuase choosing the right programming language is crucial to programmers – if you can’t think it….

A wonderful, related, podcast here from OpenSource Conversations on Scott Rosenburg’s new book, Dreaming in Code:

2 thoughts on “Programming Languages: Thinking in Code

Comments are closed.