[antlr-interest] Antlr v4 - C++ target
Ruslan Zasukhin
ruslan_zasukhin at valentina-db.com
Wed Jan 25 02:30:29 PST 2012
On 1/24/12 7:38 PM, "Gokulakannan Somasundaram" <gokul007 at gmail.com> wrote:
>
> Don't know why you even mention compile time ...
>
> RUNTIME time -- the only thing to worry about :-)
>
>
> Hmm... then why do you object to templates? Template Meta programming costs
> compile time, but will produce code that can be optimized by a compiler.
One of the best reasons have give you Ivan:
* some C++ compilers still have bugs about templates
* really huge grammars can catch limit of recursion
And so on.
Problem not in design itself. Templates can be beauty.
Problems can be later
> Virtual functions/ Function pointers provide a run time indirection, which
> cannot be optimized by a C++ compiler, so something like method inlining
> cannot be achieved there( as compiler doesn't have that info)
Yes, right.
I understand that you want even avoid virtual calls
using traits ...
> Compile Time is important for large project, as a developer will get
> frustrated with long compile times. I grew frustrated with Boost Spirit for
> the same reason. But i have high regards for the rest of the Boost library.
Well, may be I have not see that ...
May be templates can take much longer than we are used ...
As I told we avoid templates in our projects. We prefer to use COM-like
models based on interfaces.
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the antlr-interest
mailing list