Re: [OT] thoughts on Java pre processor

2002-03-09 Thread James Strachan
- Original Message - From: "Martin Cooper" <[EMAIL PROTECTED]> > It seems to me that this has already been done. Take a look at AspectJ: > > http://aspectj.org/ > > Aspect Oriented Programming (AOP) applied to Java. I see how Aspects can be added to Java code using aspectj but I don't see

Re: [OT] thoughts on Java pre processor

2002-03-06 Thread James Strachan
From: "Henri Yandell" <[EMAIL PROTECTED]> > Because I've never understood this, what is with the habit of using > Enumeration and Iterators in for loops? > > What does it have over the while loop version? Just the fact it keeps the > 'iter' variable in the loops scope? Yes. So I think this is pos

JSR-14 (WAS: [OT] thoughts on Java pre processor)

2002-03-06 Thread Tim Moore
s Developers List > Subject: Re: [OT] thoughts on Java pre processor > > > > > Its not the generation I'm concerned about - I know there > are tools to > > do this. Its the fact that spitting out all this code > becomes harder > > to maintain. e.g. i

Re: [OT] thoughts on Java pre processor

2002-03-06 Thread Henri Yandell
Heard the argument before :) Too often Foo ends up being called 'Result' because there's actually no concept that the multiple returned list returns. OO involves designing with classes that map to domain concepts. When the domain concept uses the Java language as a domain and the concept is Java

Re: [OT] thoughts on Java pre processor

2002-03-06 Thread Colin Sharples
> Its not the generation I'm concerned about - I know there are tools to do > this. Its the fact that spitting out all this code becomes harder to > maintain. e.g. its very common for the javadoc comments on the member > variable, getter & setter of a property to get stale or even meaningless. Y

Re: [OT] thoughts on Java pre processor

2002-03-06 Thread Colin Sharples
> I would like to see the ability to return multiple objects. Not sure if > this would be easy to do as it would require the preprocessor to work > across files, but I would like to do: > > int i; > String str; > > (i, str) = runCode(); public class Foo { private property int i; private prop

Re: [OT] thoughts on Java pre processor

2002-03-05 Thread Henri Yandell
Because someone has to do it. How about a C# to bytecode compiler :) The opposite of MS' J# plugin for VisStudio. On Wed, 6 Mar 2002, James Strachan wrote: > I was more thinking of should we try define a Java++ language but I take > your point. > > James -- To unsubscribe, e-mail:

Re: [OT] thoughts on Java pre processor

2002-03-05 Thread James Strachan
From: "Jon Scott Stevens" <[EMAIL PROTECTED]> > This is the perfect job for Velocity. :-) > > Just use Velocity to generate your .java code. I guess I walked right into that one ;-) I was more thinking of should we try define a Java++ language but I take your point. James -- To unsubscribe,

Re: [OT] thoughts on Java pre processor

2002-03-05 Thread Colin Sharples
> This is kinda off topic but I've been musing lately about a preprocessor for > Java. One of the early attractions to me about Java some 5-6 years ago > coming from a mostly C++ background was that there was no pre processor and > obfuscation, so Java code was very easy to read. > > However in t

Re: [OT] thoughts on Java pre processor

2002-03-05 Thread Geir Magnusson Jr.
On 3/5/02 8:55 PM, "James Strachan" <[EMAIL PROTECTED]> wrote: > To help avoid repetive code of the form... > > for ( Iterator iter = something.iterator(); iter.hasNext(); ) { > Foo foo = (Foo) iter.next(); > foo.bar(); > } > > maybe introduce a C#-like foreach statement... > > foreach( Fo

Re: [OT] thoughts on Java pre processor

2002-03-05 Thread bob mcwhirter
> Just thinking aloud here (as always ;-). Thoughts? My only thought is the lack of a directive to allow the compiler to tell you the file/line of any errors. I'm rusty on my C++, but I seem to recall they had a #file directive, so that the post-processed file, when compiled, could signal errors

Re: [OT] thoughts on Java pre processor

2002-03-05 Thread Jeff Turner
On Wed, Mar 06, 2002 at 01:55:25AM -, James Strachan wrote: ... > So the aim of the preprocessor would be to allow us to add some syntax > suguar to Java to save us some typing and avoid redundancy. I just wondered > what others thoughts are. Here's a couple of ideas for some syntax sugar...

Re: [OT] thoughts on Java pre processor

2002-03-05 Thread Jon Scott Stevens
This is the perfect job for Velocity. :-) Just use Velocity to generate your .java code. -jon -- To unsubscribe, e-mail: For additional commands, e-mail:

[OT] thoughts on Java pre processor

2002-03-05 Thread James Strachan
This is kinda off topic but I've been musing lately about a preprocessor for Java. One of the early attractions to me about Java some 5-6 years ago coming from a mostly C++ background was that there was no pre processor and obfuscation, so Java code was very easy to read. However in theses groovy