First. The question is moot. It’s a programming language. It’s good for programming.
"Objective-C and Swift are for iOS. What’s the predominant place Python is used?"
Python also runs on iOS. I don’t know if it has suitable bindings for building apps. If it does, that doesn’t change my answer. It’s good for programming.
"Java is used mainly for web apps, right? What about Python?"
Okay, at this point, the question has slipped from moot to ignorant. Can we just set that aside? Can we move on? If you want some useful insight, start here .
Yes, it’s an essay from 1974. Parts of it are a little old-fashioned, but a lot of it is still rock-solid. For example, the idea of strongly typed pointers is considered more-or-less standard now. It was debatable then. And Wirth’s opinion continues to drive language design.
Page 28 has the key points: features of a programming language. Enumerated by the inventor of Pascal, Modula, Oberon, and other languages too numerous to recall. Sure, some of the list is a little dated. "Different character sets," for example, have been superseded by Unicode. Also, the list is focused on compiled languages. Python is a dynamic language. It’s interpreted. Yes, there’s a compiler, but that’s mostly an optimization of the source code. If you replace "compiler" with "run-time," the list stands up as a description of good languages.
I often have to remind folks who work with Big Data that most of our processing is I/O bound. Python waits for the database somewhat more efficiently than Java. Why does Python wait more efficiently? Because it uses less memory. Sometimes this is a win.
Let’s not ask silly questions about a general-purpose language. Instead, let’s benchmark solutions, and compare tangible performance numbers using real code.
转载本站任何文章请注明：转载至神刀安全网，谢谢神刀安全网 » Why Python? What's it Good For? How is it Special?