Re: Generating C# from Java (Was: fit, nfit, et al?)
Michael C Two <[email protected]> Thu, 7 Aug 2003 21:43:13 -0500
| Newsgroups | gmane.comp.programming.tools.fit.devel |
|---|---|
| Message-ID | <OFE5F7760F.54958094-ON86256D7C.000D8619-86256D7C.000EEEFD@thoughtworks.com> |
I'm not so sure it would work out that well. It would be a little difficult to add support for things like properties, indexers, delegates and events in a generator. I think there is just enough different between the languages that you end up with hand written code mixing in with generated. I like the idea from the stand point of there being one FIT but it happens to run in many languages (make it FIT once and it FITs anywhere, probably gettig myself in trouble with SUN). But I'm not sure how practical it is. There were some minor issues in the first .NET port of FIT since things like the defauly access level are different. Methods without an access specifier are private in C# so the classes were not extendable. Things like that would probably be corrected but I don't think the converters are smart enough to know to write code to access methods or properties. I like the idea buy I can't say it is in the simplest thing that could possibly work catagory yet. ThoughtWorks, where being meta-cognitive is something worth thinking about. Daniel Gackle <[email protected]> Sent by: [email protected] 08/07/2003 09:15 PM Please respond to gackle; Please respond to FIT Developers To: FIT Developers <[email protected]> cc: Subject: [Fit-dev] Generating C# from Java (Was: fit, nfit, et al?) > Making the code look like 'native' C# isn't a big priority for me. One direction I'd like to explore is automatically generating the C# code from the Java code, eliminating my job altogether. :) Hmm, I've thought about this too. I wrote a C# parser a while ago (well, an ANTLR grammar) as part of an open-source C# refactoring tool. I abandoned the refactoring project because a commercial tool came out, and because I've heard MS are going to do it anyway. But I learned a lot about ANTLR and about the differences between Java and C# syntax. A Java-to-C# translator could be implemented as an ANTLR tree parser using the public-domain Java grammar. Is anyone else interested in this? Daniel p.s. Jim, VS 2003 has some support for porting Java to C#. I haven't looked at it, have you? -----Original Message----- From: [email protected] [mailto:[email protected]]On Behalf Of Jim Little Sent: Thursday, August 07, 2003 6:38 PM To: 'Steve Freeman' Cc: [email protected]; [email protected] Subject: [Fit-dev] RE: fit, nfit, et al? From: Steve Freeman [mailto:[email protected]] > OK. I started with your original version, also tagged, so it's all in > there. Have you a plan for where things should go next? I think Jeremy > and I are initially concerned with making the code look more like > "native" C#. Feature-wise, the next big thing I want to get working is properties. I also want to look at what's involved in doing fit-on-fit tests. Right now I'm concerned that my build script will say "success" even when there's a glaring (and embarrassing) defect in the output. Making the code look like 'native' C# isn't a big priority for me. One direction I'd like to explore is automatically generating the C# code from the Java code, eliminating my job altogether. :) Jim _______________________________________________ Fit-dev mailing list [email protected] http://lists.freepan.org/mailman/listinfo.cgi/fit-dev _______________________________________________ Fit-dev mailing list [email protected] http://lists.freepan.org/mailman/listinfo.cgi/fit-dev _______________________________________________ Fit-dev mailing list [email protected] http://lists.freepan.org/mailman/listinfo.cgi/fit-dev