bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interactive parsing with Bison


From: Akim Demaille
Subject: Re: Interactive parsing with Bison
Date: Thu, 6 Jul 2006 10:16:43 +0200


Le 5 juil. 06 à 23:41, Paul Eggert a écrit :

Akim Demaille <address@hidden> writes:

C makes it hard for contributors to go into bison (ask Satya).

So would C++.  C++ combines the danger of C with the complexity of Ada
(and that is an unfair comparison to Ada :-).

I sincerely agree.  C++ is very complex, but Bison does not need the
whole C++.  Using just wide spread (in terms of the existing compilers)
constructs would already dramatically simplify Bison, precisely
because much of that complexity in already handled by the language
itself.

So, while I agree with your second sentence, I disagree with the former.

On a personal note, C++ would be a fairly strong inhibitor to my
admittedly-limited contributions to Bison, since I don't know C++
well.

I can't believe Paul Eggert can't learn enough C++ to work on Bison.

  I would prefer to use almost any other major language.  ML
would be a much better choice, for example (even if it is ranked only
#50 in this month's TIOBE index :-).  But I tend to agree with
Richard; there's not yet a compelling reason to switch from C.

Exactly, that's why I don't propose ML either, nor C# or Java.

But then again, let's agree that moving to C++ is a totally
different matter.


A bigger obstacle to contributors, I think, is Bison's use of M4.  It
might make sense for us to switch from C+M4 to Scheme (or ML or OCaml
or Python or whatever), if only to get rid of the current situation
where developers have to know two languages well, one of them (M4)
fairly obscure.  But I'd like to see more than just handwaving to
justify making such a switch.

M4 is indeed, a problem.  But I'm taking about the front-end of
Bison, and the backend is irrelevant here.

Bison, being written in C, is already in C++.

That's not entirely true.

Of course it is not, but to understand what I'm taking about, it is
sufficient to know that C is (almost) a subset of C++.

and there are hundreds more like it.  No doubt this sort of thing can
be ported around, but porting would distract us from other things.

Wrong choice of example: one of the first things we would win with
C++ is the bitset support.  We would have lost so much time maintaining
it in C.  When we consider in the negative side, the
small adjustment that we would have to make (and there are), we
should also consider the positive side and only care for the balance.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]