Sunday, August 1, 2010

Re: [android-developers] Re: Android preprocessor, //#ifdef...

> I have had to learn to live without conditional compliation.  The only
> area where I really miss having a lanugage constuct like "#ifdef" is
> when I need to remove instrumentation and/or debugging code.

You can achieve this in Java using static final fields. The compiler
is smart enough to remove if block whose condition evaluates to false
at compile time (we use this a lot in Android's source code :).

--
Romain Guy
Android framework engineer
romainguy@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment