zsh-users
 help / color / mirror / code / Atom feed
From: ZyX <kp-pav@yandex.ru>
To: Ray Andrews <rayandrews@eastlink.ca>,
	"zsh-users@zsh.org" <zsh-users@zsh.org>
Subject: Re: suprise with -=
Date: Thu, 22 Oct 2015 18:43:32 +0300	[thread overview]
Message-ID: <2128161445528612@web30m.yandex.ru> (raw)
In-Reply-To: <562900EF.8090509@eastlink.ca>

22.10.2015, 18:31, "Ray Andrews" <rayandrews@eastlink.ca>:
> On 10/21/2015 11:43 AM, ZyX wrote:
>
>>  and at the time of *execution* you evaluate `first+second` as an
>>  expression.
>
> Ok, I think I begin to see where I'm going wrong. I'm extending
> 'parsing' in my head into what only happens at execution. Another
> difference between a compiled language vs. an interpreted one. I guess
> parsing, in an interpreted language, is strictly speaking a much simple
> matter. At run time more work is done. Thanks.

It is not always wrong, BTW. E.g. VimL has no “parsing” stage, it always directly *executes* the input string, doing any parsing in process. This is why e.g. when calling

    :let var=[system("echo bar>baz"),

file `baz` will appear, but `var` will not get assigned due to parsing error: VimL executor does not see absense of `]` at the time it is executing `system()` call. Also meaning of

    :echo var.val

depends on `var` variable type (it may either be `var . val` (string concat) or `var['val']` (dictionary index)).

Though I know no language implementations other then VimL (and, maybe, tcsh: have not actually seen its source code, but it looks like it is also executed in-place) that do not have the parsing stage.


  reply	other threads:[~2015-10-22 15:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-19  5:46 Ray Andrews
2015-10-19 18:35 ` Bart Schaefer
2015-10-19 19:34   ` Ray Andrews
2015-10-20  0:27     ` Bart Schaefer
2015-10-21  2:55       ` Ray Andrews
2015-10-21  3:52         ` Bart Schaefer
2015-10-21 18:01       ` Ray Andrews
2015-10-21 18:43         ` ZyX
2015-10-22 15:29           ` Ray Andrews
2015-10-22 15:43             ` ZyX [this message]
2015-10-22 16:02               ` Ray Andrews
2015-10-22 23:56               ` Bart Schaefer
2015-10-23  7:34                 ` Daniel Shahaf
2015-10-21 18:46         ` Bart Schaefer

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=2128161445528612@web30m.yandex.ru \
    --to=kp-pav@yandex.ru \
    --cc=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /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).