__HERE__

Paul Backus snarwin at gmail.com
Tue Jun 18 13:56:56 UTC 2024


On Monday, 17 June 2024 at 16:24:14 UTC, monkyyy wrote:
> most user written aliasSeq's are repetitive, yet simply nessery 
> for metaprograming
>
> ```d
> alias foo=...;
> alias bar=...;
> alias fizz=...;
> alias foobar=__HERE__;//seq!(foo,bar,fizz)
> alias bar=...;
> ```
>
> `__HERE__` is a special token that evaluates to an alias seq of 
> local symbols defined above it

Point of comparison: in Python, this is a built-in function 
called `locals()`.

https://docs.python.org/3/library/functions.html#locals


More information about the dip.ideas mailing list