LWN.net Logo

A look at two new languages: Vala and Clojure

A look at two new languages: Vala and Clojure

Posted Jun 4, 2009 14:11 UTC (Thu) by walters (subscriber, #7396)
In reply to: A look at two new languages: Vala and Clojure by rwmj
Parent article: A look at two new languages: Vala and Clojure

Type inference is possible with OO languages. Ironically recent versions of C# have a rather pathetic form of type inference.
Sure (and what is ironic about it?), but what I am claiming it that it's not overly useful in a heavily imperative/OO context, given that C++/Java/C# programmers have gone many years without it. Eclipse does a good enough job at filling out generics right now for me.
Unfortunately all of this research seems to have passed over the heads of the developers of Vala.

You missed by point that garbage collection would have been incompatible with a key Vala design goal. It didn't "pass over their head".

We can't use GC in the lower level components of the GNOME stack because then if you wanted to use a higher level language (like OCaml!) on them, you'd have two different garbage collectors in the same process which is a recipe for disaster.

design contracts, modularity, strong typing, phantom types, test-driven development.

Vala definitely has modularity and strong typing. I'd argue test-driven development is not a language feature but a cultural feature. I'm not familiar with phantom types.

Anyways, you seem to be essentially saying that because Vala isn't OCaml it must be broken, when there are actual engineering tradeoffs that you're not recognizing.


(Log in to post comments)

A look at two new languages: Vala and Clojure

Posted Jun 4, 2009 14:13 UTC (Thu) by rwmj (subscriber, #5474) [Link]

You really should read this essay!

Are you sure all the language developers are mad?

Posted Jun 4, 2009 19:28 UTC (Thu) by khim (subscriber, #9252) [Link]

Sure (and what is ironic about it?), but what I am claiming it that it's not overly useful in a heavily imperative/OO context, given that C++/Java/C# programmers have gone many years without it.

Then why it's added to C#, C++ (gcc 4.4 at least does have it), etc? Are you sure developers do it because they all are mad?

Eclipse does a good enough job at filling out generics right now for me.

Yup. Basically you are using type inference - just implemented not in compiler as sane people are doing but in editor. And it produces tons of useless clutter because it's implemented in wrong place.

We can't use GC in the lower level components of the GNOME stack because then if you wanted to use a higher level language (like OCaml!) on them, you'd have two different garbage collectors in the same process which is a recipe for disaster.

Why is it a disaster? You can combine compiled Java code (GCJ) and Scheme code (Guile) in a single process - and everything "just works". Sure, it's not exactly super-fast (you are scanning some small regions of memory twice), but no other problems are shown...

Anyways, you seem to be essentially saying that because Vala isn't OCaml it must be broken, when there are actual engineering tradeoffs that you're not recognizing.

Nope. If you want to see the language designed around existing OO-system, but which is done right - take look on Groovy. It's not perfect (no language is perfect) but it adds a lot of usefull features to Java while reusing the same JVM. Sure, JVM does have richer set of features if you compare it with GLib/GObject, but still the Vala is pretty pathetic language.

Are you sure all the language developers are mad?

Posted Jun 5, 2009 18:53 UTC (Fri) by amaranth (subscriber, #57456) [Link]

Vala does have some type inference, btw. Just like C#, it supports things like this:

var reader = new Reader ();

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds