Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14979

Re: Should [[ -v 1 ]] be supported?

Path csiph.com!goblin3!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Peng Yu <pengyu.ut@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: Should [[ -v 1 ]] be supported?
Date Thu, 27 Dec 2018 19:24:22 -0600
Lines 22
Approved bug-bash@gnu.org
Message-ID <mailman.6430.1545961123.1284.bug-bash@gnu.org> (permalink)
References <CABrM6wmrn2gi8_HgmRg67B5nsgGNFRn8Bn-r20MvC-_2LJHZ0g@mail.gmail.com> <5dac2cf2-2fac-0fd1-058f-6a84a3271738@case.edu> <abd86dbc-f6e2-62bd-e9dc-f959e2dbff9f@inlv.org> <CABrM6wkGwVbPdrXTetVsFCiwDPg5JnK4KRh49WqACsKhrrMMdA@mail.gmail.com> <e190ca7a-57a7-5cf5-8001-48806fa98caf@inlv.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
X-Trace usenet.stanford.edu 1545961124 12714 208.118.235.17 (28 Dec 2018 01:38:44 GMT)
X-Complaints-To action@cs.stanford.edu
Cc Bug reports for the GNU Bourne Again SHell <bug-bash@gnu.org>
To Martijn Dekker <martijn@inlv.org>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fVKEcd7gdFEgiYxTv91cYPqo5QX0l5qBEEEa71/xYUs=; b=BT7xcoXjRgWcQY5wK9OABVrpavKmjWdPuUcWu/nypfiawc6+Crl2VthFukmn9WEWuV 644gaErMIe0lN/bUvlteqpuUmi8gEQXTK5qBPhEGMQZ1NvqDjmXim8OfQCY5+7HJA+2C mJWEBkX9HF6c2kx6iUVDXF3JJHmxpgwjuqhSJ1l+v5wrXjjkez1FDyWs9h0tofl4aX5s Uefn59oiDr4cVwnuuOTjxcKdFOCRvJ7tJYdLhn6Kod2mtBo6c7V771YWHEpJBNMfO1S0 8p3HdOmyv16Z8GF7axu0zipYCypzh+a/ndcUVLx/d6+ZtnOqKTiVGu8p8moKe4j6F/JY EfLQ==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fVKEcd7gdFEgiYxTv91cYPqo5QX0l5qBEEEa71/xYUs=; b=F3ZE60Z+l4ZMe5VR67MMkAtOOsN6M8lCqER06yqfpZzWO34ho27+ctgHDN0bQNUNuF 4RIE3JkiSOecR1d2hthybki4MmVKBzuISK+9ET11w9KVwmganmSGvlJ1nvw1/eEBFeXa pviGIy46BT5NmQ/HaXa448bGtIpqie1ZSWDnRLNy+iOt8Kd8EVO+iliV09GkT/cHLYI1 ETJlYFYVEBJcMbPx4Tz7GNg6ralQ+Dtc46MpTRTYAeZvGk+dNxMqbNrzSGL+pBbN+lIZ cuQecMi99ON7TtGyH7xn8mU5d08kZpdkPf0XbRMJUumet28jhreUddcTFQD4haINaCt2 FlrQ==
X-Gm-Message-State AA+aEWZfsmlKGChlJ8s9MhSlxBMWjYXe6Oxy5lGNUussfIS+JabDU21S F3r1uE4pmv5HlN5W/LJrsfknWh8TvbWRuWaW8C116w==
X-Google-Smtp-Source AFSGD/VF86wOSCc1rF3lGux5EEoCAFU5Uy1GKRedCALUgG32U4DSCOvBUSkc0GOGxxeAH7aXK95FJkhoH7hpGdIKI84=
X-Received by 2002:a02:242b:: with SMTP id f43mr16444775jaa.144.1545960274734; Thu, 27 Dec 2018 17:24:34 -0800 (PST)
In-Reply-To <e190ca7a-57a7-5cf5-8001-48806fa98caf@inlv.org>
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2607:f8b0:4864:20::131
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.21
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash/>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:14979

Show key headers only | View raw


> I don't believe that at all. The number of positional parameters is kept
> anyway. It's not recalculated when you compare it to another number, so
> it's just as fast as a simple comparison of two integers.

Getting the number $# is slow.

> And even if it weren't -- if performance is *that* important to you,
> you're using the wrong language altogether.

There is no reason why bash has to be slow. Javascript was slow. But
it has been optimized to be much faster than it was before.

What I see bash is that it is syntax is much better than other
languages in terms of interactive use and not use () for arguments? It
could be made faster and with some additional features, it could be
used for other more serious applications rather than just a glue of
other tools.

-- 
Regards,
Peng

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Should [[ -v 1 ]] be supported? Peng Yu <pengyu.ut@gmail.com> - 2018-12-27 19:24 -0600

csiph-web