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

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

Three Kinds of Typed Languages

There are a lot of questions on stackoverflow about difference between static and dynamic typing, e.g. why is Smalltalk considered dynamically typed. Here is my very own perception on the subject. Background: Type systems are conservative static analysis Here is the definition of a type system from Types and Programming Languages: A type system is a tractable syntactic method for proving the absence of certain … Continue reading Three Kinds of Typed Languages

The Object Cube

There’s the lambda cube, and the big data cube. Why not a an object cube? Here would be three axis: Object Existence — The object existence dimension can range for everything ia a mutable object, to more distinctions between mutable and immutable objects, or objects and values. Existence, identity and mutability are tightly related (“I have an identity therefore I exist”). Object Composition — The … Continue reading The Object Cube