[PC-BSD Dev] PC-BSD scripting langiage... again

Kris Moore 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
>
> PRO:
> * Very popular language. "Traditional" language for scripting in Unix
> systems
> * CPAN modules collection
>
> CONTRA:
> * Often understanding of people's code is HELL :)
> * Not easy to embed perl in C/C++ application
>
> 2. Python
>
> PRO:
> * Modern popular language with strong OOP features
> * Python interpreter may be easy embedded int C/C++ application
> * Powerfull standart library
>
> CONTRA:
> * 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
>
> PRO:
> * Very easy and lightweight language
> * Extremal easy to embed
>
> CONTRA:
> * 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
> http://lists.pcbsd.org/mailman/listinfo/dev

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/

-- 
Kris Moore
PC-BSD Software
iXsystems

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pcbsd.org/pipermail/dev/attachments/20130401/15775a0b/attachment.html>


More information about the Dev mailing list