Introducing Comega

O'Reilly has an article, Introducing Comega, which covers some of the basic features of Cω: streams, "choice" and "nullable" types, anonymous structs and syntax support for XPath and relational query constructs.

I begin to see the point of language integration for XML processing, although the thought of using XML for general data storage and management still gives me the shivers...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Where are the joins?

It would be nice to see a complimentary article about the join side of Comega (in addition to the covered XML side).

Particularly, whether and how streams interact with asynchronous methods/joins/forks.

To the moment, it is not very clear why Polyphonic C# and Xen were combined into Comega. Was that because polyphony encourages immutable values, and that was an opportunity to introduce new kind of data types (XMLish)? Or because XML transformations are naturally described by concurrent processes? Or because both XML and concurrency are needed (are they?) for web services?

Wide-area programming

This introduction suggests that programming for a wide-area network will increasingly involve asynchronous messaging with XML as a message format (net data). I'm not so sure about the latter. I would have thought succinctness was a definite virtue in a message format (as distinct from a document or data interchange format). Do I really want to construct and parse an XML document every time one of my tens of thousands of concurrent nodes wants to send an integer value to another?

Most messages are larger

Transmitting one int is the worst-case scenario. Most of the time, you want to transmit fairly large chunks of data at once to avoid latency issues, and they need to have some kind of structure. Those structures should be represented in some way that's language independent, and XML's the most popular structure-representation language around.

If the verbosity really worries you and gzip is too expensive, Sun's working on a binary XML format.

Doesn't "Binary XML" qualify as an oxymoron?

Just thinking out loud. :-)


If you're programming in a language where every function/method call is a message being passed from one node to another, then I don't think it is usual to prepare a big clump of data and send it all at once. Ask the Erlang folks if it would suit them to encode all of their messages as XML! Additionally, in a lot of cases, the message to be passed will have a fairly linear structure (like a parameter list), so XML's structure-representing chops, such as they are, won't really be needed anyway.

It's different for web services, where document exchange is becoming the norm for fairly good reasons. But web service-based systems are not generally the kinds of highly asyncronous, concurrent systems that Cω seems to be meant to cater for.

So don't use XML then

C Omega isn't intended to be like Erlang, as far as I can tell. It uses ordinary method calls and shared memory to communicate between threads (but with higher-level synchronization primitives from Polyphonic C#). The XML stuff is for I/O.


I guess the point is that insisting on XML for these I/O tasks makes a certain use to which I/O might be put impractical. Wouldn't it be better to have some kind of content type negotiation going on, so that XML is the default, but one can plug in better representations if neede? (I should say I have made no effort to understand Cw).

not very clear why Polyphonic

not very clear why Polyphonic C# and Xen were combined into Comega

Maybe it was simple convenience - share the grunt work of maintaining and distributing an experimental compiler.

"As our initial experiences using Polyphonic C# were positive, we have recently built a more robust, full-featured and maintainable implementation on top of an ‘experimentation-friendly’ C#-in-C# compiler being developed by another group within Microsoft."

">Modern Concurrency Abstractions for C#

Yippee it compiles!

At least the current preview compiler no longer requires .Net 2003 to be installed!


I have a little language that integrates relational and object-oriented primitives too. :(