That's pretty much my fault. The reason for choosing C++ was that installability/lack of dependencies has always been a big motivation for Thrift. Lex/yacc is more widely deployed and ready-to-go than pretty much any other scanning and parsing system out there.
I personally like Java and think it'd be a decent choice, but there do seem to be a decent number of people out there building services who seem to vehemently hate Java. Lots of *nix systems do not have a JVM or JDK installed by default -- and it's pretty annoying for users who aren't writing services in Java to have to install it to build the compiler. We also looked at Python, but the PLY package was a separate extension to Python that was not in the standard distro, which would mean more installation woes to get Thrift up and running. I definitely agree that the C++ compiler code is pretty ugly, and the string manipulation really nasty, but the focus with v1 was on making it easy for users of Thrift, rather than developers of Thrift. It'll definitely be a lot of work to rewrite the compiler, but it's an effort that I would endorse provided it doesn't come at any cost to the Thrift end-user. Cheers, Mark -----Original Message----- From: Jake Luciani [mailto:[email protected]] Sent: Thursday, March 05, 2009 5:12 PM To: [email protected] Subject: Re: Some thoughts about changes to Thrift I've always wondered why the IDL compiler was written in c++, seems like a bad choice. I think a java compiler using JavaCC would be a bit better (though requiring java is a pain for some). At least it would be cross platform.... -Jake On Thu, Mar 5, 2009 at 7:15 PM, Michael Greene <[email protected]> wrote: > Jérémie BORDIER <[email protected]> wrote: >> I might be wrong, but i think that the current compiler isn't cross >> platform, this could be the right time to do something to ease >> thrift's accessibility on windows (even if they don't run the CPP >> Library, at least they could generate Java stubs) > > Unfortunately, the cross-platform problems with the C++ Thrift > compiler are mostly outside of the project's control, but I agree that > this is a big problem at the moment. As far as I can tell (and I've > looked far and wide) Flex and Bison versions late enough for Thrift > simply cannot be built on Windows. I have some changes stored away in > a working copy to build the compiler in Visual C++ that are mostly > working, but lack a native Windows flex lib. > > Michael Greene >
