[antlr-interest] C# Target Poll

Andrew Bradnan andrew.bradnan at gmail.com
Sun May 18 11:09:01 PDT 2008


I was checking out C5 recently and I found the C5 libraries "non-obvious".
I prefer something more opaque perhaps when it comes to data structures.

Just for reference don't forget all the ones that are hidden in the BCL.
System.Collections.Generic;
System.Collections.ObjectModel;	// Collection<>, ObservableCollection<>
System.Collections.Specialized;

When I need something I almost always find it in the Wintellect library
Power Collections (from Jeff Richter et al).  So at least there will be good
documentation.
http://www.codeplex.com/PowerCollections

Pair, triple, set, tree, deque ... all missing ones.

hth,
Andrew
-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Johannes Luber
Sent: Friday, May 16, 2008 4:27 PM
To: antlr-interest at antlr.org
Subject: [antlr-interest] C# Target Poll

Hi!

While thinking about future improvements, I came across over the switch of
the used collections from the .NET versions to the one supplied by C5
<http://www.itu.dk/research/c5/>. The C5 library has more functionality and
more types of collections than the .NET. Instead replicating text from the
PDF please read at least the introduction yourself:
<http://www.itu.dk/research/c5/Release1.1/ITU-TR-2006-76.pdf>

My motivation to consider C5 is simply that I prefer to use state-of-the-art
tools, and to a certain extent .NET falls short. I have used it in a few
projects so far and will use it again. It is easy to use. I had no problems
besides non-binary-serializing of a dictionary, which was caused by .NET
bugs, so I wouldn't hold that against C5. Also, serializing seems to be an
unusual need for compilers anyway and can be circumvented by own designs
anyway, as it probably would have been anyway. Please correct if I'm wrong
and C5 would prevent doing from something what you can do now.

Still, I can't simply switch the engines as I'd enforce the same change for
all C# target users. As I can see, the use of C5 has the following
disadvantages:

-The inclusion of another assembly, thus increasing the application size
-C5 may be fast, but the .NET classes are speedier as they sacrifice some of
the extended functionality. How much exactly, I don't know, but if you care
about nano-seconds, then C5 might be the wrong choice. Compiler builders
care about the speed of their software after all.

Not problematic is:

-C5 can be used like ANTLR in (non)commercial projects as it uses a BSD-like
license.
-It can be integrated with .NET classes as it is based on interface
programming.

In case, I have overlooked important points, please shout them. I haven't
done any work to switch to C5 yet, so voting down my suggestion won't waste
any effort from my side.

Johannes
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger



More information about the antlr-interest mailing list