[antlr-interest] C# Target Poll

Sam Harwell sharwell at pixelminegames.com
Fri May 16 21:48:36 PDT 2008


I think for a small runtime like Antlr, the best move would be:

- Minimize dependencies
- Minimize size
- Maximize it's "feel" compared to the .NET framework (best practices, conventions, etc.).

There is a tremendous amount of work that could be done to improve the runtime as we move to .NET 2.0. If I had any suggestion at this point, it'd be to have a runtime dll built that doesn't include the debug-only classes.

Sam

-----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 6: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