rosuav at gmail.com
Mon Aug 10 12:50:39 CEST 2015
On Mon, Aug 10, 2015 at 12:55 PM, Roger Hunter <rogerh906 at gmail.com> wrote:
> I agree that some of Python is simple but the description of subprocess is
> certainly not.
That's because spawning subprocesses is a complicated thing to do - or
rather, it's a simple thing to do, but with a large number of options.
This is particularly true when you want (a) security, (b) performance,
(c) flexibility, and (d) convenience/simplicity in your code, as you
basically can't have all of them at once. Compare other modern
languages and how they go about spawning processes; chances are you'll
see stuff about chroot, standard streams, environment, uid/gid,
priority, file descriptors, resource limits, whether it uses a shell,
and stuff like that. Python handles all of those using keyword
arguments; Pike lets you provide an options mapping; I'm guessing
Node.js has you provide an object with key/value pairs to configure
it; whatever your language, whatever your framework, these features
require a bit of complexity.
Python *is* simple. As languages go, Python has far fewer edge cases
and detaily bits than most. But you can't get away from the inherent
complexity of computers... fortunately, Python puts most of that into
its standard library, so you can follow the standard lookup rules and
function calling conventions to figure out what's going on.
Of course, simplicity isn't all there is to making a good language.
Ook has just three tokens (used in pairs, making eight effective
opcodes), but that doesn't make it easy to use.
More information about the Python-list