Wednesday, May 12, 2010

Language Envy

Microsoft envy does not end with the Mono folks which made their C# and VB knockoffs for Linux. Language envy is alive and kicking everywhere in the Linux world. Today we look at some open source technologies and languages that have copy-pasted some Microsoft covered patents and are putting everyone in danger.

Let us begin our journey into the patent infested waters with the Vala Language. Vala is a language inspired with C#, so inspired that they compare themselves directly with C#. They also compared themselves with Java, and when they do, the text reads like a C# vs Java document more than anything else.

The Mono flamewars did not prevent these geniuses from doing a carbon copy of a Microsoft technology. They figured that copying some features while making some slight changes to the syntax and distancing themselves from Microsoft would do the trick.

A quick look through the patent system reveals Vala is infringing happily left and right on Microsoft property. Let us see what our Google-fu renders:

6951022, March 2001 and Development system with methods for type-safe delegation of object events to event handlers of other objects from January 1996 describes the invention:

A visual development system is described which provide "method pointers" allowing a developer/user to achieve delegation between objects programmatically as well as visually. Delegation "binds" an event source with an event handler. This binding is directly supported within the programming of the system.

The Vala Tutorial:

Delegates represent methods, allowing chunks of code to be passed around like objects.

The A development system providing a property-method-event programming (PME) model for developing context-free reusable software components patent expands on the delegate idea and describes events and properties, a useful feature in C#.

If you are wondering where you have seen these before, look no further than the Vala tutorial:

It is good object oriented programming practice to hide implementation details from the users of your classes (information hiding principle), so you can later change the internals without breaking the public API. One practice is to make fields private and provide accessor methods for getting and setting their values (getters and setters).

This syntax should be familiar to C# programmers. A property has a get and a set block for getting and setting its value. value is a keyword that represents the new value that should be assigned to the property.

Now you can access the property as if it was a public field. But behind the scenes the code in the get and set blocks is executed.

Due to Microsoft's patent promise, it seemed natural to dismiss any further investigation on patent infringements on anything derived from C# and .NET.

But bloggers quickly analyzed Microsoft's patent promise and they found a series of loopholes on it.

The promise covers a subset of Mono, but the patent promise is limited to _conforming_ implementations of the standards. This means that _some_ Mono parts are covered, but it _also_ means that the promise does not apply to any other technologies that might copy ideas selectively.

This means that neither Java, nor Vala get a free ride.

The weasel wording is:

Microsoft irrevocably promises not to assert any Microsoft Necessary Claims against you for making, using, selling, offering for sale, importing or distributing any implementation, to the extent it conforms to one of the Covered Specifications, and is compliant with all of the required parts of the mandatory provisions of that specification ("Covered Implementation"), subject to the following:

You read that right. Either you implement the whole spec or Microsoft has every right to sue. It is an ironic turn of events: Mono and C# are safer from patent litigation than Vala is.

At some point C# introduced "nullable types", a feature covered by patent 7647580, Vala carbon copied the feature and exposed everyone to a tasty lawsuit, the question is, can prior out be found?

They copied C#'s feature and syntax verbatim:

An instance of a nullable type T? can either be a value of type T or null.

value-type ?
reference-type ?

The problems go deeper, another quick Google finds that the namespace system used in C# is also patented, and it is a system that Vala copies verbatim.

Microsoft also patented the C# style of type inferencing, another system that Vala copied verbatim.

They also copied Microsoft patented Lambda Expressions. Down to the syntax described on the patent:

Declaring a method inline must be done with relation to a delegate or signal, so that the method signature is already defined. Parameter and return types are then learned from the signature. A lambda definition is an expression that returns an instance of a particular delegate type, and so can be assigned to a variable declared for the same type. Each time that the lambda expression is evaluated it will return a reference to exactly the same method, though this is never an issue as methods are immutable in Vala.

( [ lambda-params-list ] ) => { statement-list }

identifier [ , lambda-params-list ]
It is important to realise that Vala's lambda methods are not closures as in some other languages. They cannot access the local variables that existed in the scope they were created in. They may however directly access the object they were created by, using the "this" reference, if that is appropriate in the context.

These are only the results of a quick Google search for "C# language" and Microsoft on

But Vala is not alone here, Python and Java also copied ideas from C#, we will look at some of those in a future post.


  1. The language is irrelevant, libraries are the issue.

    You might want to look instead at what patents libraries other languages are using that are based on Microsoft ideas.

    Pull reader XML is one of those things that people copied that microsoft introduced with .net, and the whole notion of parsing XML as it is read as opposed to parsing it when the full document is complete:

    Java did not have these facilities at the time, they used the sax callback-based model instead. These days they copied the model in the form of

    The popular libxml library also copied .NET's design, they state this on their page:

    Qt also copied this design:

    Down to the type name and interaction models described in the patents.

  2. They are both relevant: language, libraries and runtime as evidenced by the Oracle lawsuit.