Notes Information Apocalypse

What is least surprising?

I always enjoy reading interviews and discussions with Larry Wall - a brilliant language designer whose unconventional wisdom and humor makes his explanations of complex and chaotic issues seem strangely coherent. Perhaps he is the one true opinionated programmer. Ruby, as an opinionated language certainly owes a lot to Perl, but there are some things Larry Wall believes Ruby hasn’t got right:

I think it's a violation of the Beginner's Principle of Least Surprise to make everything an object.

A counter point to this sentiment is that the tendency to 'primitivize' types in an otherwise object oriented language leads to a far greater cognitive dissonance than just having a single consistent model to start with. A shorthand syntax for expressing literals can go a long way towards avoiding the difficulty of understanding objects at the very start of someone’s programming experience.

The problem is that beginners are only beginners for a short period of time. Once they start to understand the language space better, then the cognitive dissonance of a split between primitive types and objects starts to kick in. Maybe this is only a problem in languages like Java where the behavior of primitives (eg: int) and fully fledged objects (eg: Integer) can be completely different.

One of the reasons why Flash ActionScript has been so successful with designers and traditional creative types is precisely because its "everything is an object" philosophy makes logical sense and is easy to work with, having a direct correspondence to the way we explain and model the everyday world around us using nouns.