On 09/07/06, Shlomi Fish <[EMAIL PROTECTED]> wrote:
On Sunday 09 July 2006 02:45, Amos Shapira wrote:
> On 09/07/06, Shlomi Fish <[EMAIL PROTECTED]> wrote:
> > but also the CS one to teach bash programming instead of csh programming:
>
> If you go through all this to convince them to switch - I think you'll
> do them a greater favour by convincing them to switch to standard
> Bourne Shell[1] rather than learn to rely on Bash - it will ensure
> greater standard-compliance and portability[2].

You have a point here. However, bash (and ksh) has many useful extensions over
standard Bourne Shell. The old Bourne Shell is very limited, and while being

I know - but being able to program without them is more useful when
addressing cross-platform (e.g. Sun Slowlaris or HP's Hpuke or maybe
even the OSS systems like FreeBSD or NetBSD) where I'm not sure you
can expect to find Bash on a standard installation but I'll bet my
life savings on being able to find Bourne shell on them.

the standard, most people don't consistently use its features exclusively in
their scripts. The Bourne Shell does not have the super-useful $(...) for
example, which I believe is a ksh extension (albeit ash which is a
minimalistic Bourne Shell clone implemented it).

And you can write excellent and useful, AND PORTABLE, scripts without
them (e.g. see the output of automake or autoconfig).


>
> For instance - dig through the Debian bug tracking system and see how
> many bugs or changelogs mention changes made in order to avoid
> reliance on Bash features.

Hmmm... reliance on Bash features where?

Mostly scripts under /etc/init.d, as far as I remember, but just
generally scripts installed by Debian packages. Maybe one of the
resident current Debian developers can quote a policy clause relating
to this?


>
> They can learn, as an addendum, to use Bash interactive features and
> sugar toppings, but "don't put a barrier in front of a blind man" like
> MS does by injecting non-standard features without making them aware
> of that (cf HTML, JavaScript, C++, and what they tried to do to Java).
>

There are a few differences here:

1. bash, zsh and recently even ksh are open-source.

That (and the other points below) is not my point - I know they can be
installed on virtually any system you would want to use them on etc.
etc. - but being depend on their extensions without being able to
distinguish them from the "basic" Bourne shell will cripple the
students in the long run. I'm saying this from a perspective of long
personal experience.

I'm not sure which is exactly your goal of this switch - script
programming or interactive use? There is a difference. What I suggest
is that you teach "THIS is Bourne Shell" and then you can add "and in
Bash/ksh/etc you can ALSO do it that way, but be prepared that it
won't be always available on the system".

Cheers,

--Amos

--
"(a grizzly) can tear through a tree like a Jewish mother
through self-esteem."              - The Simpsons

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to