Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: suprise with -=
22.10.2015, 18:31, "Ray Andrews" <rayandrews@xxxxxxxxxxx>:
> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author