[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Language functionality (was: Re: another mysterious segfault)

From: Mark Burgess
Subject: Re: Language functionality (was: Re: another mysterious segfault)
Date: Wed, 31 Aug 2005 07:37:25 +0200

On Wed, 2005-08-31 at 10:44 +1000, Tim Nelson wrote:
> On Tue, 30 Aug 2005, Mark Burgess wrote:
> > Speed has nothing to do with it. Cfengine was written in C bcause there
> > was no alternative when I started cfengine. But even a scripting
> > language will not help avoid a seg fault, if it is caused by a pathology
> > of the system. I know people have this irrational belief in perl as
> > language for everything, but you just can't do serious programming in
> > perl. It's too primitive as a language.
>       I find this an interesting perspective, because I believe Perl is 
> one of the most advanced languages (ie. the opposite of primitive).  I've 
> thought of some possibilities, and I'm interested in which one is true.
> 1.    You know of features available in other programming languages (eg.
>       Lisp macros) that Perl doesn't have, and think that Perl is
>       primitive due to not having them.  I find this unlikely compared
>       to C, unless you're comparing with a version of Perl earlier than
>       5, but I'll believe it if Mark indicates that this is what he's
>       thinking. 
> 2.    You believe Perl is primitive due to the way that things like OO
>       and case statements are implemented (and I agree that they could
>       be improved; see Perl 6 :) ), ie. you simulate them using other
>       functionality. 
> 3.    You have some other definition of primitive, of which I am
>       unaware.
> 4.    Something else I haven't thought of
>       This might be slightly OT, but I use cfengine because it's more 
> expressive (ie. less code = more functionality) than any other language in 
> this problem domain.  I use Perl for the same reason elsewhere.  I'm just 
> wondering if I've missed something, which is why I'm asking if Mark (B) 
> could take a moment to indicate which of the four options above is true

Perl is clearly tip top for certain tasks in system admin - no
competition. Cfengine was started in 1993 (perl 3/4 time) when C was
really the only option.

The main reason I say that perl is "primitve" in this context is that it
does not have datatypes or type checking. That makes it possible for
objects to be totally misrepresented. It also makes it very difficult to
return structured objects from data. It would be difficult to do things
like file copying in perl, because file copying needs to understand
objects that have holes in them, which could can't do from the high
level interface.

It is possible that Perl 6 will solve this kind of thing, but I believe
that Perl has a different destiny. Cfengine 3 will be written in a
simple dialect of C++, to borrow from the vast standard libraries that
have been developed for it. So it should combine the best of both


reply via email to

[Prev in Thread] Current Thread [Next in Thread]