" using __FILE__ or __LINE" Actually, it's a bit irritating that javac doesn't implement those and a few others (particularly __CLASS and __METHOD). They would be very easy to implement within the language, without the need for a preprocessor. But certainly the need for them is reduced by the generally good to excellent traceback info available in most environments. Just a little lacking in logging situations.
On Aug 1, 2:50 pm, dm1973 <david050...@gmail.com> wrote: > I think most peoples opinion is that it just is not useful in java. > There have been numerous discussions about needing/not needing a > preprocessor in Java. You are not going to be #defining symbols (use > a static class), including files, using __FILE__ or __LINE ( use the > logging, no symbols means no ifdefing code (if (false) workes the > same as #if 0 ), macros for functions (ie make a class and use static > inline function). If you care to tell use the problem you are trying > to solve, some could probably suggest a solution that doesn't involve > macros. Im 15 years of Java, I have never missed them. Macros in the > build system on the other hand... > > On Aug 1, 10:40 am, Leigh McRae <leigh.mc...@lonedwarfgames.com> > wrote: > > > On 8/1/2010 4:29 AM, Mark Murphy wrote: > > > > Java (J2ME, Blackberry, Android) does not have a native preprocessor. > > > Neither does Javascript for WebOS/HTML5 applications, nor Actionscript > > > for Flash/Flex/AIR applications. Neither do some languages drifting > > > into the mobile space (e.g., Ruby, and Perl AFAICT) for Android, > > > Meego, and Symbian. > > > > It is probably more accurate to say that C and its derivatives (e.g., > > > C++, Objective-C, C#) and .NET languages (VB, C#) have an integrated > > > preprocessor, and that those languages are widespread in mobile > > > platforms today. > > > Preprocessing for j2me is supported by SUN via NetBeans. It's pretty > > clear that SUN fully backs preprocessing for j2me if you look at all the > > support provided. > > > BlackBerry preprocessing is fully supported via their compiler, rapc. > > > What I don't understand is why so many people are against it. It's just > > a tool and one that can get you out of a tight spot. Give people the > > tools and let them cut their own toes or feet off. Oh and yes I know > > what the reply will be. Write it yourself, it's open source... We > > aren't Java or we are Java depending on what we are debating... > > > -- > > Leigh McRaewww.lonedwarfgames.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en