It's my understanding that Android isn't Java compliant so I don't understand this comment. Perhaps I am wrong.

I also don't understand what this has to do with the specification anyway as it's a tool issue really. If we are to talk about Java and hence Sun, well they have a preprocessor for their j2me stuff as they have come to the conclusion that it adds value. C# uses a preprocessor. RIM has a one also. I really don't understand why it couldn't be added and the people that it offends can just not use it.

Perhaps you should try and write an app that isn't an SDK sample?

Leigh

On 5/20/2010 10:14 AM, Romain Guy wrote:
The Java language specifications do not include a preprocessor syntax,
so we won't. You can use other languages that compile to .class or
.dex though.

On Thu, May 20, 2010 at 7:12 AM, Leigh McRae
<[email protected]>  wrote:

On 5/19/2010 11:49 PM, Xavier Ducrohet wrote:
Making petition to make us do something is an absolute waste of time.

Filing reasonable feature request (http://b.android.com) with a
concise explanation why the feature is needed has a much better chance
of success.

Contributing is even better! See the new http://source.android.com and
be aware that the dev tools development has moved 100% to the open, so
you can see real time what we're doing.

On Wed, May 19, 2010 at 2:41 PM, [email protected]
<[email protected]>    wrote:

I think Google should make an effort to improve the android developer
tools. Here I write some things I think need to take in account:

- Fix problems of communication between IDE and emulators

Yes this is annoying.


- Add support to conditional compilation #IF,#ELSE,#ENDIF (I wan't to
have 2 versions in the same proyect ... beta and non beta, free and
paid, etc.)

Free and paid apps shouldn't be done by a preprocessor for several
reasons: You want to change the content of XML file. an XML
pre-processor is going to be harder. Also you probably won't have the
same files at all and a pre-processor won't really let you
exclude/include whole files.

We will introduce a new build mechanism that will allow you to easily
share code and resources across 2+ application projects that will be
much better at handling this case.

As for the beta vs. final version, yeah, as someone else said, this
makes no sense.


First the OP didn't talk about using a preprocessor for xml.  I would agree
that that would be odd and there are better tools for that.  Still a
preprocessor could be used to conditionally include a resource by id.  How
about I give you some concrete examples and you can help me see the light?

----------------------------------------
Example 1
----------------------------------------
//#if BETA
    if ( hasBetaExpired() )
        System.exit( 0 )
//#endif
----------------------------------------
Example 2
----------------------------------------
public final class Assert
{
        public static final void RIP( final String msg )
        {
//#if BETA
                sendReport( msg );
//#endif
                System.exit( 0 );
        }
}
----------------------------------------
Example 3
----------------------------------------
public class Debug
{
        void Println( String msg )
        {
//#if !RELEASE
                Log.d( TAG, msg );
//#endif
        }
}
----------------------------------------
Example 4
----------------------------------------
//#if PLATFORM_BLACKBERRY               //@     omega =
(float)MathUtilities.acos( cosom );
//#else                 omega = (float)java.lang.Math.acos( cosom );
//#endif               ----------------------------------------
Example 5
----------------------------------------
public static final float VecToHeading( float x, float y )
{
//#if PLATFORM_BLACKBERRY
//@     float    fAngle = ((float)Fixed32.atand2( (int)(x * 65536.0f),
(int)(y * 65536.0f) )) / 65536.0f;
//#else
        float    fAngle = ((float)Math.atan2( x, y )) *
57.295779513082320876798154814105f;
//#endif
        if ( fAngle<    0.0f )
                return fAngle + 360.0f;

        return fAngle;
}


--
Leigh McRae
www.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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en




--
Leigh McRae
www.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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to