Thread overview
appendable alias squence
Feb 01, 2022
monkyyy
Feb 01, 2022
Nick Treleaven
Feb 01, 2022
monkyyy
Feb 01, 2022
monkyyy
Feb 01, 2022
max haughton
Feb 03, 2022
monkyyy
February 01, 2022

https://monkyyy.science/posts/mutable_templates/

https://github.com/crazymonkyyy/aliaslist

https://run.dlang.io/is/NeEq8Z

Tried to explain how my appendable alias sequence works ¯_(ツ)_/¯

it uses compiler bugs and is likely fragile, but here it is anyway.

February 01, 2022

On Tuesday, 1 February 2022 at 01:39:19 UTC, monkyyy wrote:

>

https://monkyyy.science/posts/mutable_templates/

I only skimmed the article as I'm AFK, but:

>

I hate verbose folds, I hate this syntax, I hate that the pieces are in a different order then for loops; but its how to do heavy lifting in templates.

Perhaps alias assign would help? It might actually be related to why the foo=foo_!(data); bug 'works'.

https://dlang.org/spec/declaration.html#AliasAssign

February 01, 2022

On Tuesday, 1 February 2022 at 15:30:17 UTC, Nick Treleaven wrote:

>

On Tuesday, 1 February 2022 at 01:39:19 UTC, monkyyy wrote:

>

https://monkyyy.science/posts/mutable_templates/

I only skimmed the article as I'm AFK, but:

>

I hate verbose folds, I hate this syntax, I hate that the pieces are in a different order then for loops; but its how to do heavy lifting in templates.

Perhaps alias assign would help? It might actually be related to why the foo=foo_!(data); bug 'works'.

https://dlang.org/spec/declaration.html#AliasAssign

I doubt bug is related to alias assign given I found it before (I think), and while I haven't played with alias assign yet I think theres going to be some baseline safety features to attempt making this sort of thing not happen

February 01, 2022
>

The AliasAssign and its corresponding AliasDeclaration must both be declared in the same TemplateDeclaration.
These are outside the template, so I really doubt they are related unless this aspect is purely to minimize fun

February 01, 2022

On Tuesday, 1 February 2022 at 01:39:19 UTC, monkyyy wrote:

>

https://monkyyy.science/posts/mutable_templates/

https://github.com/crazymonkyyy/aliaslist

https://run.dlang.io/is/NeEq8Z

Tried to explain how my appendable alias sequence works ¯_(ツ)_/¯

it uses compiler bugs and is likely fragile, but here it is anyway.

The array template parameter bug will probably be fixed in the next release, just warning you.

February 03, 2022

On Tuesday, 1 February 2022 at 19:19:55 UTC, max haughton wrote:

>

On Tuesday, 1 February 2022 at 01:39:19 UTC, monkyyy wrote:

>

https://monkyyy.science/posts/mutable_templates/

https://github.com/crazymonkyyy/aliaslist

https://run.dlang.io/is/NeEq8Z

Tried to explain how my appendable alias sequence works ¯_(ツ)_/¯

it uses compiler bugs and is likely fragile, but here it is anyway.

The array template parameter bug will probably be fixed in the next release, just warning you.

breaking my workflow >:(

it maybe sorta coulda been useful in this one idea I put at the bottom of my todo list