Consistency in Scala

One of the goals of Scala is increased consistency compared to Java.Here are three high-level consistencies in Scala: Every value is an object. There are no primitives in Scala. Even its version of void (Unit) is an object. Nothing is an object. Nil is an object. Arrays are objects. Everything is an object. Every statement …

Read moreConsistency in Scala

For-confusion in Scala

In Scala, the “for” structure can throw off the Java programmer. For one, it looks enough like a Java “for” loop for a Java programmer to make a guess on how it works — but that guess is likely to be wrong. For another, the for-loop is implemented in Scala as a special case of …

Read moreFor-confusion in Scala

Familiarity v readability

The topic of discussion at the office today (yes, it’s Sunday) is Languages, Verbosity, and Java by Dhanji R. Prasanna, which purports to extoll the clarity of Java compared to more expressive languages like Ruby, Python, and Scala. What it really says is: “Languages that are familiar are more readable.” Of course languages that are …

Read moreFamiliarity v readability

IntelliJ IDEA 11

The new version of IntelliJ IDEA is out, and I’m liking it. Gradle integration: creating a new project from a build.gradle was smooth and easy. Then when dependencies were added to the gradle file, the gradle plugin came in handy. One line added to build.gradle apply plugin: ‘idea’ and then one execution of gradle idea …

Read moreIntelliJ IDEA 11

Humility in programming languages

John Backus (pdf) distinguishes two parts of a programming language: “First, its framework which gives the overall rules of the system, and second, its changeable parts, whose existence is anticipated by the framework but whose particular behaviour is not specified by it.” The framework part is all the built-in language constructs. The changeable parts are …

Read moreHumility in programming languages