The meaning of pattern variables
[Thread Prev] | [Thread Next]
- Subject: The meaning of pattern variables
- From: nml <arumakanil@xxxxxxxxx>
- Reply-to: myrddin-dev@xxxxxxxxxxxxxx
- Date: Thu, 7 Dec 2017 14:25:22 +0800
- To: myrddin-dev@xxxxxxxxxxxxxx
As far as I understand the assignment operator (=) can have two meanings. The first is binding a value to an identifier, which is a compile-time operation, which does not map directly to generated machine code. The second is storing a value to a location represented by a variable. What is the case for pattern variables like `i` in `for i : [Foo Bar Baz]`? I suppose they are identifier binding and no new variable allocations and assignment(storing) is involved. So `i` should have exactly the same lvalue as the variables it is bound to. Which means &i == &Foo when i is bound to Foo. Do I understand it correctly? -- mura
Re: The meaning of pattern variables | nml <arumakanil@xxxxxxxxx> |
- Prev by Date: Re: [oridb/mc] runtest.sh: support running single test (#162)
- Next by Date: Re: [oridb/mc] runtest.sh: support running single test (#162)
- Previous by thread: Re: [oridb/mc] runtest.sh: support running single test (#162)
- Next by thread: Re: The meaning of pattern variables
- Index(es):