:: [Dng] system scriptinng language.
Startseite
Nachricht löschen
Nachricht beantworten
Autor: Hendrik Boom
Datum:  
To: dng
Betreff: [Dng] system scriptinng language.
It appears to be T.J. Duchene who said, in an article entitled "[Dng]
More ranting thoughts [Re: Something wrong with devuan mail list?",
which I can't reply to directly:

> Lastly, I think that writing system management tools in Python is a
> terrible idea.  Python is a language with "duck tying", which means that
> a lot of errors are only detectable when the software is being run on
> your setup. One sight change and "klabooey" - errors to STDOUT. I can
> certainly think of other reasons to dislike systemd, but the fact that
> the management tools are written in Python pretty much tops that
> list. It's not an anti-Python rant, anymore than I hate Perl. I
> just do not feel that Python is the right tool for the system jobs,
> given that it: a) is duck-typed, b) has no fixed standard, and c)
> versions of Python are incompatible.    


This seems to be a coplaint against languages tht are not statically
typed rather than against duck-typing. You need a conplete review of
the entire code with a static type-check to get a lot of errors caught
without haveing to encounter them during execution. Duck-typing itself
does not stand in the way -- you can statially check a duck-typed
language as long as it requires the progrmmer to declare the types of
enough identifers.

What you seem to want is a run-time secure, typed language.

May I suggest a look at some compiled, garbage-collected languages for
scripting? Two I like are Modula 3 and OCaml. The people at Jane
Street have succeeded in configuring their OCaml for use as a scripting
language -- compiled on demand by a suitable #! line at the start of
the script file. Since they deal in finance (and I suspect autamated
trading, though I don't really know), they have severe
security requirements.

Scheme is perhaps also a possiblity. Besides being the official
(but not statically typed) scripting language for the GNU project,
there's also Typed Rackeet, a completely independently implemented
statically typed version of the langauge.

Any of these would beat shell scripting for reliability. Some might
even be convenient.

-- hendrik