help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] What was the reason to give declare its name?


From: konsolebox
Subject: Re: [Help-bash] What was the reason to give declare its name?
Date: Thu, 1 Dec 2016 19:16:29 +0800

On Thu, Dec 1, 2016 at 8:48 AM, D630 <address@hidden> wrote:
> I have been reading a lot about early shell history these days. Can you
> remeber, how the built-in command 'declare' got its name? What was the
> rationale behind it?

I'm more interested to know why `declare` was made to declare
variables in the local context by default, when there's already the
`local` builtin. Was it because it was meant to remain compatible with
`typeset`? And even if `local` was added later (if it was added
later), I think it was still early enough for `declare` to be able to
change behavior.  We could have enjoyed global declaration of
associative arrays as early as 4.0.

-- 
konsolebox



reply via email to

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