digitalmars.D - Alpha renaming in types is finally here
- Andrei Alexandrescu (6/6) Jun 08 2015 I've been wondering for a good while whether it's possible with what we
- deadalnix (3/9) Jun 08 2015 Kind of like when I discovered this mail client written in awk,
- Andrei Alexandrescu (3/16) Jun 08 2015 Yah, the function parameter storage classes are gnarly to handle. The
- Timon Gehr (8/14) Jun 08 2015 - This is not alpha renaming. Alpha renaming renames a variable at the
- Andrei Alexandrescu (7/25) Jun 08 2015 I've added documentation and examples to
- Timon Gehr (5/33) Jun 08 2015 Well, no, there is no binding site involved. You could use ReplaceType
- weaselcat (5/11) Jun 09 2015 almost missed the secondary(?) part of this PR.
I've been wondering for a good while whether it's possible with what we have. Looks like it is, modulo some gnarly hacks in introspecting function types. https://github.com/D-Programming-Language/phobos/pull/3394 Destroy! Andrei
Jun 08 2015
On Monday, 8 June 2015 at 07:51:24 UTC, Andrei Alexandrescu wrote:I've been wondering for a good while whether it's possible with what we have. Looks like it is, modulo some gnarly hacks in introspecting function types. https://github.com/D-Programming-Language/phobos/pull/3394 Destroy! AndreiKind of like when I discovered this mail client written in awk, I'm both amazed and horrified.
Jun 08 2015
On 6/8/15 1:51 AM, deadalnix wrote:On Monday, 8 June 2015 at 07:51:24 UTC, Andrei Alexandrescu wrote:Yah, the function parameter storage classes are gnarly to handle. The other type constructors line up quite nice. -- AndreiI've been wondering for a good while whether it's possible with what we have. Looks like it is, modulo some gnarly hacks in introspecting function types. https://github.com/D-Programming-Language/phobos/pull/3394 Destroy! AndreiKind of like when I discovered this mail client written in awk, I'm both amazed and horrified.
Jun 08 2015
On 06/08/2015 09:51 AM, Andrei Alexandrescu wrote:I've been wondering for a good while whether it's possible with what we have. Looks like it is, modulo some gnarly hacks in introspecting function types. https://github.com/D-Programming-Language/phobos/pull/3394 Destroy! Andrei- This is not alpha renaming. Alpha renaming renames a variable at the point it is bound and updates all occurrences of the variable. Alpha renaming does not change the term it is applied to. This is type replacement. - How do you use it to create recursive types using algebraic? (Assuming that's what your comment refers to.)
Jun 08 2015
On 6/8/15 5:43 AM, Timon Gehr wrote:On 06/08/2015 09:51 AM, Andrei Alexandrescu wrote:I'm using the term a bit loosely but I think appropriately.I've been wondering for a good while whether it's possible with what we have. Looks like it is, modulo some gnarly hacks in introspecting function types. https://github.com/D-Programming-Language/phobos/pull/3394 Destroy! Andrei- This is not alpha renaming. Alpha renaming renames a variable at the point it is bound and updates all occurrences of the variable. Alpha renaming does not change the term it is applied to. This is type replacement.- How do you use it to create recursive types using algebraic? (Assuming that's what your comment refers to.)I've added documentation and examples to Feedback appreciated. Thanks, Andrei
Jun 08 2015
On 06/08/2015 06:23 PM, Andrei Alexandrescu wrote:On 6/8/15 5:43 AM, Timon Gehr wrote:Well, no, there is no binding site involved. You could use ReplaceType or SubstituteType.On 06/08/2015 09:51 AM, Andrei Alexandrescu wrote:I'm using the term a bit loosely but I think appropriately. ...I've been wondering for a good while whether it's possible with what we have. Looks like it is, modulo some gnarly hacks in introspecting function types. https://github.com/D-Programming-Language/phobos/pull/3394 Destroy! Andrei- This is not alpha renaming. Alpha renaming renames a variable at the point it is bound and updates all occurrences of the variable. Alpha renaming does not change the term it is applied to. This is type replacement.Oh, it is used in the implementation. That clears it up. Now, how do I declare mutually recursive types? :o)- How do you use it to create recursive types using algebraic? (Assuming that's what your comment refers to.)I've added documentation and examples to Feedback appreciated. ...Thanks, Andrei
Jun 08 2015
On Monday, 8 June 2015 at 07:51:24 UTC, Andrei Alexandrescu wrote:I've been wondering for a good while whether it's possible with what we have. Looks like it is, modulo some gnarly hacks in introspecting function types. https://github.com/D-Programming-Language/phobos/pull/3394 Destroy! Andreialmost missed the secondary(?) part of this PR. this looks incredibly useful, I often find myself using ugly templates to do this.
Jun 09 2015