The Ambitions of Scala

In the object paradigm, a system consists of objects with mutable state, whereas in the functional paradigm, it consists of functions and immutable values. At first, these two worlds seem incompatible. But not so for Odersky. In 2004 he released the first version of Scala, a language that combines both. Scala’s roots are object-oriented, sharing the same basic constructs as Java, with whom it is … Continue reading The Ambitions of Scala

Package Visibility is Broken

In Java, classes and class members have by default package visibility. To restrict or increase the visibility of classes and class members, the access modifiers private, protected, and public must be used. Modifier Class Package Subclass World public Y Y Y Y protected Y Y Y N no modifier Y Y N N private Y N N N (from Controlling Access to Members) These modifiers … Continue reading Package Visibility is Broken

Masterminds of Programming

Masterminds of Programming features exclusive interviews with the creators of popular programming languages. Over 400+ pages, the book collects the views of these inventors over varying topics such as language design, backward compatibility, software complexity, developer productivity, or innovation. Interestingly, there isn’t so much about language design in the book. The creation of a language seems to happen out of necessity, and the design itself … Continue reading Masterminds of Programming

Your Language is a Start-up

Watching the TIOBE index of programming language popularity is depressing. PHP and Javascript rule the web, despite the consensus that they are horrible; Haskell and Smalltalk are relegated to academic prototyping, but unanimously praised for the conceptual purity. How technolgy adoption happens is a puzzling question. Evidences seem to suggest that what matters is to attract a set of initial users, and then expand. The initial offer … Continue reading Your Language is a Start-up

Debunking Object-Orientation

What is an Object? What is the essence of the object pardigm? How do objects differ from other abstractions? What are their benefits? What are their pitfalls? Can we encode objects with lower building blocks? Should we have objects all the way down? Some people think they are clever to observe that OOP has no formal, universal definition. Democracy, love and intelligence don’t either. — … Continue reading Debunking Object-Orientation

The Cost of Volatile

Assessing the scalability of programs and algorithms on multicore is critical. There is an important literature on locks and locking schemes, but the exact cost of volatile is less clear. Are volatile really free? Is volatile expensive? Java’s Atomic and volatile, under the hood on x86 Cost of Volatile For the software composition seminar, Stefan Nüsch and I decided to look at this topic. Essentially, … Continue reading The Cost of Volatile

Natural Queries

Programming language research is a quest for expressivity. The aim it enable the expression of complex computations in concise and intuitive ways. The problem is that conciseness and intuitivity are usually conflicting. Expressivity is enabled by higher-order constructs which are hard to reason about. On one hand, functional languages enable the expression of complex computations concisely, but their intuitivity is low. Integrated query languages can … Continue reading Natural Queries

Why Smalltalk?

This is a question is occasionally asked by students and here is the answer. We are not religious. This choice is not dogmatic. We do both research in programming languages and tool support for software evolution. In both cases Smalltalk is handy: Programming language — Smalltalk is extermely uniform. Experimenting with a language change is faster in Smalltak, than say, Java or Ruby. Their syntax … Continue reading Why Smalltalk?

Understanding the Visibility of Side-Effects

This entry is all about the Java Memory Model and the happens-before partial order it formalizes. The official specification of the JMM is authoritative but unreadable. Fortunately, there are useful resources around that aim at making it more accessible: the wikipedia entry the JSR 133 FAQ Java Concurrency in Pratice Happens-Before The JMM defines a partial order called happens-before on all actions in the program. … Continue reading Understanding the Visibility of Side-Effects

Reflecting on Reflection

(A cheap title, I know) Reflection is one of these concept that constantly move from “obvious” to “puzzling” in my head–you feel like you have a firm understanding of it, and then suddently it evades, you feel puzzled by certain aspects, and ultimately confused about the whole thing. Why? Two Perspectives One of the first source of confusion is that reflection can be apprehended with … Continue reading Reflecting on Reflection