From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2070 invoked by alias); 30 Apr 2018 03:30:36 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23375 Received: (qmail 27759 invoked by uid 1010); 30 Apr 2018 03:30:35 -0000 X-Qmail-Scanner-Diagnostics: from mail-ot0-f172.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(74.125.82.172):SA:0(-1.9/5.0):. Processed in 3.524414 secs); 30 Apr 2018 03:30:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CZuXvSN79y+WcsVPjZiDbLZ3WFGHJNZxJaRFCGFHN+4=; b=ndiDTEZtRyaHKSDgBPnC6VEzmwJ2Nvuk5A0JZC0jr/YiEHLjTPdGeAXpf6cb3lntgp kUyY0y8o2u9ak73BbttaNmv9EyfDQwvpTix3O0CvjCfMkKU4Ky9btIP2snoJSxoB5gDx veaWoQGZQqrGeJtw2DAg8SSkg5A8nYy++e7DSyi5OeGbTH77CE81FekpytZHr/O7LWPJ hn5glKXHnWlqjqUM+htIwWPb+fwWb5KyAuJYcclv5/clPRsZqizNORBCgS66tExedXTq Q09R3trsc80gewmmlW9PtAjymDYQlAoKb9/98N18hYdbpPSfK/92KWYM9p1uBIBCm26K n5zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CZuXvSN79y+WcsVPjZiDbLZ3WFGHJNZxJaRFCGFHN+4=; b=RF+rEREgnz60z7xp/WLTiTn2t5UH/PjKuUmHrMkkFT9B7951j9IJ7gXHStwbmzeZ9Y 3qQ2Jp0zr1+WeUkwGVYLWMcPHNwFR/mDiHK1GJ4owh7DwafVQn8zFnfHvCszS7t6Aytj c8xFIWWIrwK3UE0ZWspiC/QQ+KBI4Jh2L7KGLs3MqZxKpgTknLu08Sxuu9PrTFXfYniw vUa0oWan5R6MY5x+dZRjPo4ZkTqcmSF9eLGnfdwvojjy9X5c1n4N31rJw2v73kSsYqYs vTrugCAkdEioLKbElJW4l9hGJQ2zVKF6GEOsNv2cIP1AqrXUTm9hs2hOh/S1dlyB+fRL 53LA== X-Gm-Message-State: ALQs6tATVFmUJ0/riH9DdFVNSkAATrcl6d1FwQD4hNo/qbN01NpqpUCK 7hHX7/p3Mr+fY2PAG5TEtDNrUmn2eveXu7Lagl3vQg== X-Google-Smtp-Source: AB8JxZraCxP7LZRLKuIVsSJ50DnAqil5xT6yJGFeHKlFoi2KAxxd/dtZilrzLkmj2BjuaXccvgpRtvDV1czu77yTelE= X-Received: by 2002:a9d:3644:: with SMTP id w62-v6mr7958200otb.287.1525059029909; Sun, 29 Apr 2018 20:30:29 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20180423110642.0e0a5ebe@camnpupstephen.cam.scsc.local> References: <20180422204849.GA30387@prometheus.u-strasbg.fr> <20180423110642.0e0a5ebe@camnpupstephen.cam.scsc.local> From: Sebastian Gniazdowski Date: Mon, 30 Apr 2018 05:30:09 +0200 Message-ID: Subject: Re: zsh at perl conference and few questions To: Peter Stephenson Cc: Zsh Users Content-Type: multipart/alternative; boundary="000000000000bd433a056b087979" --000000000000bd433a056b087979 Content-Type: text/plain; charset="UTF-8" On 23 April 2018 at 12:06, Peter Stephenson wrote: > > for x in {1..20}; do > > print "$x * 2 = $[x * 2]" > > done > > > > seems terrible to me compared to > > > > for x ({1..20}) print "$x * 2 = $[x * 2]" > > I don't really know how widely it's used, but you get a certain amount > using short loops without having to remember novel syntax. > > for x in {1..20}; print "$x * 2 = $[x * 2]" > > Mikael always reminds that having short_loops enabled weakens the parser ability to detect errors, so maybe it's worth mentioning here. > d) is there a plan to have something like namespaces ? > > It was first discussed a long time ago, but no one has bitten the > bullet. Simple minded namespaces --- allow dots in the variable works > --- are trivial, but the variable code is very complicated and working > out how to do it properly is a big task that no one has been prepared to > look at (saying "someone else ought to do this" does not count as > looking at it" :-)). > It's an occasion to me to tell the observation that function namespaces would be rather more needed than variable ones. The point is that hook plugins like z-sy-h and zsh-autosuggestions copy each widget to hook into it. So it's ${#widgets}**2 functions out there with those plugins loaded, and times of "lets see my functions print -rl -- ${(k)functions}" are over. -- Best regards, Sebastian Gniazdowski --000000000000bd433a056b087979--