[Mobile-sig] Experiments with Dalvik

David Boddie david at boddie.org.uk
Fri May 20 17:42:32 EDT 2016


On Fri May 20 03:08:20 EDT 2016, Dima Tisnek wrote:

> Apologies if my response came out negative.
> 
> First off, big ups for fresh toolchain!

No worries. I'm not trying to sell a particular solution to anyone, and
I know that not everyone will want to follow the path I'm on.

> Let me clarify my world view:
> 
> I believe in Python, which means Android running full-fledged cpython
> or pypy, including running Python code from source (for development at
> least), and python runtime / stdlib (obv. some system restrictions
> apply).
> 
> Beyond that, I believe that Android runtime (UX, UI, hw access, IPC,
> etc.) is the way to go. That means no Qt or any other "native" 3rd
> party libs.
> 
> There are tools to bridge the two, and there's where I hope to see 
> progress.

It's good that you have specified what you are looking for. I think that
there are lots of different ideas about what would be the right solution
for Python users, but different users have different requirements so
there will never be one perfect solution. For example, if someone wants
to do cross-platform mobile development, they may want something like Qt
to abstract away the details of the platform to some extent. That will
never be satisfactory to someone who wants to be exposed to the platform
API with nothing in the way.

Obviously, I'm less bothered about using something other than CPython or
PyPy. If something is close enough to the core Python language then it's
probably good enough for me. I am a fairly conservative user of language
features. :-)

Hopefully, there will be at least one solution for each of the use cases
that people have for Python on Android so that everyone can find 
something
that meets their needs.

> I like what you've done with Duck, I especially like Android type 
> annotations.
> Perhaps it's possible to integrate this syntax into plain Python
> program using only decorators and metaclasses, that is running your
> syntax with cpython.

Thanks. I hoped the syntax annotations might make people think about how
types are declared in Python, if you need to declare them. They are a 
bit
like the slot declarations in PyQt and I would like them to be optional 
in
the case where it should be obvious that a method is a reimplementation 
of
a method in a base class or interface.

I thought about writing some kind of framework that lets CPython run the
annotated programs but it sounds like a lot of work to sort out things
like method overloading. My brother put in a lot of effort to handle 
this
kind of thing in his javaclass Java classfile loader for Python, which
means that I've heard enough about the problems involved to want to 
avoid
them. :-)

David


More information about the Mobile-sig mailing list