Re: Perl in the toolchain

From: Sam Ravnborg (sam@ravnborg.org)
Date: Sat Feb 01 2003 - 07:12:13 EST


On Fri, Jan 31, 2003 at 06:23:03PM -0500, Jeff Garzik wrote:
>
> klibc uses perl for text munging. i.e. one of Perl's acknowledged
> strengths. This is not a case of choosing a favorite script language,
> but instead a case of choosing "the right tool for the job."

Choosing the right tool for the right job is an argument that matters
in this context.
Two major type of arguments pop's up when selecting diverse tools:
1) "the right tool for the right job"
2) "the most preferred tool"

My main objective is that argument 2) should _not_ be the rationale
behind adding a new tool to the mandatory tool chain.

> Therefore, any rewrite of _this_ _particular_ script in C or shell
> script would be willfully choosing a sub-optimal implementation language
> for this task.
The perl scripts used in klibc looks straightforward, expect one that uses
some md5 CPAN module.
Like with C you can in perl pull in a lot of uncommon stuff.

My main objective is to avoid a lot of noise due to one added tool
that may not be required.
Part of the noise will be because people do not understand the
syntax.

> If you take into account the fact that the overwhelming
> majority of the target audience does indeed have Perl on their system,
> then that only serves to make it more clear that any such perl-to-C
> rewrite would not be on any technical nor practical basis at all.

One example could be fixdep:
fixdep could have been done in perl as well. Implementing that one
in c does not count as an "perl-to-C" translation.
To repeat my point.

There is only one good reason to add additional tools to the mandatory
set in the tool-chain. At that reason is that the tool is the right
choice, and not just someones favourite.
If that imply a small C utility then fine.

> Thanks for raising this subject! I wanted to give your answer some
> consideration, because it is worth mentioning, and discussing.

Thanks self. I just want to make sure the technically right choice is taken.

        Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 07 2003 - 22:00:08 EST