Boo to Java source code transformation...

76 views
Skip to first unread message

alopecoid

unread,
Nov 1, 2007, 7:34:51 PM11/1/07
to boojay
Hello,

First of all, congrats!

Boo on the JVM is a much appreciated effort! I think this language has
a lot of potential.

I was wondering... could we have an option not only to compile Boo to
Java bytecode, but also the option to generate [readable] Java source
code?

This might serve as a "risk-free" way to introduce Boo into projects
where one might be weary of being tied to a new language, because one
could always translate the Boo source into Java source, essentially un-
boo-ifying the codebase.

Also, this could give non-bytecode-speaking people an opportunity to
study the resulting Java source, and investigate ways to optimize
either their Boo source accordingly, or perhaps better yet, find ways
to optimize the way that Boo represents itself on the JVM. I know
there isn't necessarily a direct correlation between Java source and
Java bytecode, but I think in many cases it would be close enough to
get the right idea.

Additionally, this could serve as a good example for a way to develop
Boo-to-source translators for other languages (perhaps even to C/C++,
sort of the way "finalization" works in Eiffel).

What do you think?

Thanks again for Boo on the JVM!

Marcus Griep

unread,
Nov 1, 2007, 7:38:00 PM11/1/07
to boo...@googlegroups.com
Is there a Reflector-type program for Java?  That would be able to take the generated bytecode and show you how it looks as source code.
 
Otherwise, you could always write an alternate printer modeled after the BooPrinterVisitor.  I plan to write one for C# as I work on splitting things out of Boo.Lang.Compiler, so writing one for Java shouldn't be too far askew.
 
Marcus

--
Marcus Griep
——
Software Engineer
Capabilities Development
781.652.6321

VistaPrint
Best Printing. Best Price.
Business Cards are FREE at www.VistaPrint.com.
——
את.ψο´

Leandro Rodrigo Saad Cruz

unread,
Nov 2, 2007, 8:46:27 AM11/2/07
to boo...@googlegroups.com
+1

--
Leandro Rodrigo Saad Cruz
software developer - certified scrum master
:: scrum.com.br
:: db.apache.org/ojb
:: guara-framework.sf.net
:: xingu.sf.net
Reply all
Reply to author
Forward
0 new messages