Live data from Hacker News

Android: The Land That Python Forgot

speakerdeck.com

61–70 of 127 posts

Re: Android: The Land That Python Forgot

#61
post #35

Earlier quoted context omitted.

Exactly. I've never understood why someone would prefer a untyped language. It's just a bad developing experience, code needs more debugging, it is harder to maintain and overall productivity is lower. Untyped languages are fine only for small scripting languages.

There's a difference between typed and statically typed. Python is a strongly typed language, but it is dynamic. > bad developing experience, code needs more debugging, it is harder to maintain and overall productivity is lower All of these observations are highly subjective. > Developing experience: I much prefer developing in python than java. If IDEs factor in, there are a number available for python, none of whic…

> I much prefer developing in python than java. If IDEs factor in, there are a number available for python, none of which I use, because I find a simple editor is usually enough.

Protip: Try pudb. It will blow your mind.

Re: Android: The Land That Python Forgot

#62
performance performance performance.

And it is not just about direct user experience either.

Even if a given app may be written in Python it will probably drain the battery faster, since for each bit of work that would have taken X cpu cycles with Java, you would spend 20X with Python, not to mention memory handling, etc...

A language is just a tool, use the right one for the Job.

a Pythonista

Re: Android: The Land That Python Forgot

#63
post #42

Earlier quoted context omitted.

Working in C# right now and agonizing over the class hierarchy...

I love C#, but when moving between it and python, I find I focus too much on the types and hierarchies.

I used to be like this before I realized I used class inheritance way too much and shifted to using composition in the majority of cases.

Re: Android: The Land That Python Forgot

#64
post #22

I'd point out that Python was the preferred high-level language at pre-MS Nokia. There was Python for S60 for a long time, even before either iOS or Android existed. More recently Nokia made new Python bindings for Qt, PySide, to be used on Maemo.

Could it be the reason Symbian was slow and eventually failed? Were they interpreting or compiling Python?

> Could it be the reason Symbian was slow and eventually failed?

No, and no. I don't think Nokia ever shipped any significant amounts of Python code themselves.

> Were they interpreting or compiling Python?

It was the standard CPython interpreter.

Re: Android: The Land That Python Forgot

#65
post #40
post #27

Earlier quoted context omitted.

Thanks for transcribing the talk onto the slides. Most people don't, and just post their mostly-useless slides.

Yes. Actually, when I saw it was just slides I simply closed the tab because they're most often useless, not adapted to presenting something on the web. After seeing your comment I went back to it, and indeed, the talk is there, which was unexpected and great.

Glad you enjoyed it – I find I present better if I have notes. Glad they have extra utility for you!

Re: Android: The Land That Python Forgot

#66
post #18
post #2

The first half of the deck is about what a smartphone is. You should cut those out and get to the subject matter.

Lots of times you are talking to people who have been writing enterprise/web stuff for decades and never dipped into mobile. Especially at a conference for a language that is pretty much not on mobile at all. I think it was appropriate.

The talk was at mostly web developers. The second and third parts of the talk were about why the web doesn't cut it as a platform.

Part 1 was there to lay the groundwork. Basic? Maybe, but it's necessary.

Re: Android: The Land That Python Forgot

#67

What about performance? Seems one of the biggest concerns on mobile devices is to achieve high performance with low overhead. What kind of penalty comes with a separate python runtime?

You're running the Python interpreter as a native executable, so it's roughly comparable to Dalvik.

If you want performance, write it in C, optimise it. That's what the NDK is for.

Re: Android: The Land That Python Forgot

#68
post #42

Earlier quoted context omitted.

Working in C# right now and agonizing over the class hierarchy...

What does it even mean? You can dump everything into one class hacky Python way if you want. You can use dynamic keyword if you don't care about type safety.

We're not talking about monolithic, do-everything, hacky classes. You could do the same thing in C#.

Static languages (usually) force you to use interfaces and sub-typing just so common code can be reused. Duck typing is a much nicer way of working - without having to jump through seemingly unnecessary hoops. The situation is even worse when you code for testability. Things that really shouldn't have an interface now require one, so you can mock out the object appropriately. This is all avoided in a language with duck typing.

This is actually where Go has a great impact. You get your static type checking without being forced to use explicit interfaces. It essentially uses duck typing for interface implementation.

You're free to enjoy static typing over dynamic typing all you like - but you shouldn't make the mistake of thinking dynamic typing is inferior in any way. It is different - just like imperative vs functional is different. You make a series of tradeoffs, that is all.

Re: Android: The Land That Python Forgot

#69
post #39
post #12

It isn't that Python forgot Android, or Python developers don't care about mobile. It's that Google decided to base Android on the JVM and make Java the primary language for developing on the platform. There's nothing Python could have done about that.

One very prominent point in those slides is that Android is not based on the JVM, which complicates things for plenty of things that expect Java on JVM instead of Java on Dalvik (e.g. Jython).

Yup. If we had Jython, this talk wouldn't have needed to have been written.

And I'd probably be working to improve Jython as we speak.

Re: Android: The Land That Python Forgot

#70
post #55
post #36

Earlier quoted context omitted.

I doubt you really mean untyped languages. Untyped languages includes many assembly languages, BCPL and some Forths. It does not include typical scripting languages like Perl, Ruby or Python - all of which are strongly typed.

I don't know about Ruby but Perl certainly isn't strongly typed. You can run 'print "5.0" + 6' and get 11 as the answer. That's weak typing and types are implicitly converted to whatever. Python is strongly typed only for the basic scalar types. With objects and classes there are just objects that may or may not have certain bound functions and attributes. Duck-typing is mostly perfectly sufficient since any errors d…

Sorry, but what are the problems with everything being an object? That's a feature. Python 3.4 now has @singledispatch, though I don't know where I'd use that yet.
Post reply on HN