zsh-workers
 help / color / mirror / code / Atom feed
From: "Rocky Bernstein" <rocky.bernstein@gmail.com>
To: "Richard Hartmann" <richih.mailinglist@gmail.com>
Cc: "Dan Nelson" <dnelson@allantgroup.com>,
	 "Zsh hackers list" <zsh-workers@sunsite.dk>
Subject: Re: Numeric version of ZSH_VERSION?
Date: Mon, 1 Sep 2008 09:06:31 -0400	[thread overview]
Message-ID: <6cd6de210809010606h19dc0ce0t34c5cbd9843d5c2e@mail.gmail.com> (raw)
In-Reply-To: <2d460de70809010538xfac8eceqc37a177c0481869c@mail.gmail.com>

Yeah, I thought of that too. One can use ! is-at-least and booleans
for ranges. Or one can add as you say all of this into the is-at-least
package.

This kind of awkwardness would be more glaring in languages that
support numeric ranges (e.g. Perl, Python, Ruby).

My personal view is that is-at-least is a more complicated  solution
to a problem which is more easily and naturally solved  by adding a
numeric variable which just keeps increasing, e.g. 08100101 which
might be the first change of Sept 1,  '08. (I just tried
using 08100101 in an arithmetic expression and the number seems not to
be too large.)

ksh recently added such a thing to .sh.version, so that in a string
context it prints a string while in a numeric context it prints a
number:

  $ echo ${.sh.version}
  Version M 93t 2008-08-25
  $ printf "%d\n" .sh.version
  20080825

(From which I gather David Korn and Glenn Fowler don't plan on more
than one release a day.)


On Mon, Sep 1, 2008 at 8:38 AM, Richard Hartmann
<richih.mailinglist@gmail.com> wrote:
> On Sun, Aug 31, 2008 at 05:16, Dan Nelson <dnelson@allantgroup.com> wrote:
>
>> The Misc/is-at-least function should do what you need:
>
> It lacks a is-at-max sibling _if_ you need to actually check on ranges.
> Why not just use revision numbers for this (unless ZSH falls into the
> git trap, at some point :p)?
>
>
> Richard
>


  parent reply	other threads:[~2008-09-01 13:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-31  2:54 Rocky Bernstein
2008-08-31  3:16 ` Dan Nelson
2008-08-31 13:21   ` Rocky Bernstein
2008-09-01 12:38   ` Richard Hartmann
2008-09-01 12:43     ` Mikael Magnusson
2008-09-01 13:06     ` Rocky Bernstein [this message]
2008-09-01 13:14       ` Rocky Bernstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6cd6de210809010606h19dc0ce0t34c5cbd9843d5c2e@mail.gmail.com \
    --to=rocky.bernstein@gmail.com \
    --cc=dnelson@allantgroup.com \
    --cc=richih.mailinglist@gmail.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).