IDEs with precompiler (support)

[quote]There are plenty of uses for preprocessors.
[/quote]
Doesn’t mean they all should be done or are necessary - e.g. the cited Gamasutra article was written by someone who isn’t doing their job properly, hired above their level of expertise, since they have written terrible java source out of ignorance for how to use java.

Most of them that should be done seem to be attempts to make up for mistakes/omissions by Sun - e.g. AspectJ, Retroweaver etc.

When all you have is a hammer, …

[quote][…]
hmm no wait. The gl.gl* expansion would be better as an eclipse-plugin that extends the content assist functions…
[/quote]
Nah :wink:

Those gl.gl* names were done with static import in mind. That is with 1.5 you can static import and thus all you need to write then is gl*.

I hope I don’t reopen the JOGL/LWJGL war. But static imports can only be used with LWJGL. The GL methods are not static in JOGL.

And I agree that pre-processing is a last resort. But we cannot go back in history and change the J2ME specs or the J2EE specs, so it is the best of the bad solutions available.

But I do think the use of bytecode instrumentation in JDO is very elegant.

@oNyx:
Java 1.5? We wish.
Currently only the latest SDKs support 1.4

@blahblahblahh:
I would not make presumptions about the skills of others without knowing what the landscape they work in is like.

If you think you can do it better, you are welcome to try.

And FYI Sumea IS one of the top mobile game developers.
Think that speaks for their skills.

Sure. However, I know that that source is an unnecessary hack, and an abuse of java, concommitant with someone who doesn’t “think” in java, and probably doesn’t understand it properly. My experiences with similar people in the past - often very good at C++ or some other languages - suggest that this general pattern carries over into other areas of their development. Overall, this tends to exacerbate the knock-on negative effects on the practicality of developing and maintaining any of their source, and hence a negative effect on profitability of their employer.

That said, I was probably overly harsh. Suffice it to say, my natural reaction would be to fire anyone doing something like that, and go pay $100k for a decent highly-experienced development-team leader instead.

Just writing bad source, or fulfilling a game project at 20% greater cost than you ought to have done do not in themselves prevent you from doing the rest of your job (e.g. delivering the project at all is more important than doing so at optimum cost), nor destroy businesses, but they do tend to be bad for the business. So, sure, the company could be the most successful company in the world, but that doesn’t mean their staff are all perfect, or even all competent at the roles they’re in. Look at id games - developers have worked there who, with hindsight, were clearly mediocre. That situation is repeated all over the industry.

There are, of course, other paradigms of pre compiling other than the C++ type of text expansion macro. The Lisp type of macros are a very different kettle of fish, and are one of the reasons lisp seems to refuse to die. Something similar for java can be seen at http://jse.sourceforge.net/

Earlier in this thread someone mentioned the annotations of Java 5.

I’ve always wondered what the point off them was, as I only see it as a mostly useless way to add unreadable junk to the source code.

Obviously, I’m a bit ignorant here :). But if someone could start a new thread and explain what’s so great about them, I would be thankful :slight_smile:

btw. Ant can substitute new text for particular tokens in the source, without any plugins… I’m not sure if that would help with the original problem or not.

I personally like Ant. It does a decent job at what it is designed to do. I think people have tried to make it do a bit too much and that leads to the negative perception of using XML as a scripting language, which Ant is not.

Look at Netbeans 4.0 Mobility Pack which beta1 has been released.
It has preprocessor solution for device fragmentation and many other cool features.

http://www.netbeans.org/kb/articles/mobility.html

besides the aforementioned ant task you can use a user defined builder in eclipse to preprocess files with a preprocessor. run->external tools->external tools->program->new
under the main tab:
location: path to your preprocessor
working directory: $(container_loc)
arguments: -w -Wall -C -o${container_loc}\preprocessed${resource_name} ${resource_loc}

refresh: check refresh resources upon completion

now under project->properties->builders->import->(your preprocessor tool)

or if you want to omit the run thingy

project->properties->builders->new

personally i’d prefer the specialized ant task or a complete nature with customized builders within eclipse, which makes it possible to use whatever “toolchain” you’re using :slight_smile:

kind regards,
rené