bison-patches
[Top][All Lists]
Advanced

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

Re: Interactive parsing with Bison


From: Paul Eggert
Subject: Re: Interactive parsing with Bison
Date: Wed, 05 Jul 2006 14:41:30 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

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 :-).

Or perhaps your "hard for contributors" argument is based more on the
availability of programmers?  If so, I'm not sure I agree with that
either.  Many younger programmers are learning languages other than
C++.  Java is undoubtedly the most popular right now.  If we switched
to C++ now we would be investing significant effort in a downhill-mode
technology.

For your amusement you might look at <http://www.tiobe.com/tpci.htm>,
notably the "TCPI Long Term Trends" graph.  This is a survey based on
"world-wide availability of skilled engineers, courses and third party
vendors"; this is obviously flawed but it's the best current survey I
know of.  For quite some time Java and C have been #1 and #2.  C++
made a run for the top two spots a couple of years ago, but then
suffered a sharp drop, and has been stuck at about 55% of C's ratings
since then.

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 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.

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.


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

That's not entirely true.  For example, I can't build Bison 2.3 using
Sun C++ 5.8, due to incompatibilities between C and C++.  Here's the
first fatal diagnostic I get:

   "bitset.c", line 141: Error: Cannot assign void* to bitset_union*.

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.




reply via email to

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