ooc is a new high level language.  I saw it advertised on github today.

Their website says:

ooc is a modern, object-oriented, functional-ish, high-level, low-level, sexy programming language. It’s translated to pure C with a source-to-source compiler. It strives to be powerful, modular, extensible, portable, yet simple and fast.

If I understand correctly, OOC is a it is compiled by the JVM down to C source.  It looks similar to other popular new languages, like Ruby and even moreso Google’s Go.

It looks a little nicer than some at first glance.

It has garbage collection, type inference, and probably continuations (or anonymous functions/blocks — same difference).

Functions are first order objects (or rather, automatically wrapped in a default package).  Classes use a static new() function to instantiate.  You can also “cover” primitives, which means that unlike Java, you can extend String (Char *) .

I like how it makes declarations simple and concise

// variable declaration
x : Int
y : Float
z : Char

// variable declaration and assignment
a := 42
b := 7.9
c := "Hello, world!"

Though I don’t like the := assignment.  Why not infer declaration with regular assignment?

x = 1
y = 4.2
z = "Hello"

It certainly makes java-style generics prettier:

list := ArrayList<Int> new()

I wonder if it’s compiling down to C makes it portable and fast?  I also wonder if it’s type-inferred declarations also allows inferred type casting (e.g. from int to float?)

I think I’ll be looking into it a little more (when I get a chance.)  Would love to have feedback from folks who’ve actually used OOC or know more about it.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s