Re: Generating C# from Java (Was: fit, nfit, et al?)

Ward Cunningham <[email protected]> Fri, 8 Aug 2003 09:44:23 -0700
Newsgroups gmane.comp.programming.tools.fit.devel
Message-ID <[email protected]>
On Thursday, August 7, 2003, at 11:59  PM, Jim Little wrote:

> I haven't talked to Ward about this yet so I don't know what he thinks.
> When we first started the port, we looked at a regex-style approach but
> postponed it in favor of getting a first release out, and we never got
> back to it.

Also, when we wrote the c# we made a few name changes required by c# 
with the best intention of moving those name changes back into the java 
just so they would look the same to someone going back and forth 
between c# and java.

Regretfully those name changes were never made. Had we used the 
generator approach we never would have had two sources that could get 
out of sync.

As I write this, I am wondering how simple I could make a generator If 
I wrote two generators, one for java and one for c#, that both ran off 
of the same "generator specification". Snobol was written that way, as 
all "macro" calls. They must have used something on the level of m4. I 
bet it would be cake to write a macro processor that was even more 
suitable for object code than m4 given that we have things like perl, 
python or ruby for the macro implementation language.

Of course generating by machine or by hand would be easier if we had 
good acceptance tests. At fit-fest next week my own goal will be to 
advance the fit acceptance tests (fat) which is a complementary way to 
enforce consistency between implementations.

--
Ward Cunningham
503-245-5633 v	mailto:[email protected]
503-246-5587 f	http://c2.com