[PC-BSD Dev] PC-BSD scripting langiage... again
kris at pcbsd.org
Mon Apr 1 12:34:10 PDT 2013
On 03/29/2013 13:01, Yuri Momotiuk wrote:
> Hello everybody
> Some time ago I sow here discussion about pc-bsd scripting language.
> Let me to present some ideas about this
> Here is most popular scripting languages (please tell me where I'm
> wrong or if I miss something):
> 1. Perl
> * Very popular language. "Traditional" language for scripting in Unix
> * CPAN modules collection
> * Often understanding of people's code is HELL :)
> * Not easy to embed perl in C/C++ application
> 2. Python
> * Modern popular language with strong OOP features
> * Python interpreter may be easy embedded int C/C++ application
> * Powerfull standart library
> * Not fully C-like syntax (you should get used to the indentation
> instead of braces and to for operator at least)
> * Weak backward compatibility (at least for major versions)
> * Someone saind that python needs a lot of memory and CPU
> 3. LUA
> * Very easy and lightweight language
> * Extremal easy to embed
> * I really don't know is Lua contains featured 'system' library (for
> process spawning and handling and so on) and where Lua is using for
> general porpose scripting in Unix systems
> Actually, I like to use Python because this language looks more modern
> that Perl and mey be embedded for same C/C++ tool (or deamon) if we
> need scripting capabaility.
> Can we select some single scripting language for tasks which are too
> complex for shell scripts? IMHO that language should be present in
> distribution and should be recommended for complex tasks (but that
> language should not be replace of shell for all tasks, IMHO)
> PS I have no time to re-read text. I hope you will understand this :)
> Best regards, Yuri Momotyuk
> Dev mailing list
> Dev at lists.pcbsd.org
I would prefer to use Python, if and only when shell does not suffice.
Couple reasons for this:
1. Its easy to include the interpreter into the base, and well supported
2. Its the same language as "FreeNAS" is using, and will enable us to
share more code with them.
(I want to pull their ZFS replication functionality into Life-Preserver
at some point, and its all python based)
3. The Python-QT bindings also make it very attractive when integrating
into desktop utilities.
IMHO shell is the best for most tasks, but I agree there are exceptions
where it makes sense to use a more "modern" language.
If this is what we decide on, I can add python to the list of packages
included in default PC-BSD / TrueOS systems (which I think it may
already be) and then we can create a src-py branch in current/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dev