Giter VIP home page Giter VIP logo

Comments (5)

ericscheid avatar ericscheid commented on September 25, 2024

I anticipate that sometimes authors will want a variable insertion to occur dynamically, and other times will want the value captured as at time of declaration.

from homebrewery.

calculuschild avatar calculuschild commented on September 25, 2024

Wasn't this already discussed pretty heavily when designing the specs for variables? I feel like we decided to avoid this exact thing for a specific reason, but I can't recall at the moment.

In any case, something like this would involve basically a full rewrite of the Variables extension. I would put this at low priority for now.

from homebrewery.

ericscheid avatar ericscheid commented on September 25, 2024

Done for two main reasons: 1) to avoid recursion hell, and 2) to facilitate imperative interpreting.

Both are still good reasons.

The functionality suggested by $[TraitMagicResistance][Sally] shouldn't even involve further varnames. As Gazzok89 suggests, the functional form declaration should be more like [TraitMagicResistance]: The $1 has magic resistance. .. where the $1 represents to first fed-in parameter. This way each parameter can be re-used in the same template too, like $1 and $2 were sitting in a tree. $1 was hopeful, $2 not so much. $3 observed from a distance.. (The syntax suggested here is only a placeholder).

Whether these are called template variables, or madlib variables, or function variables .. eh, whatever works.

In any case, I agree .. we should let variables sit for a while before attempting to extend it. Let the bugs shake out. And remain open to a possible rewrite as a solution.

from homebrewery.

Gazook89 avatar Gazook89 commented on September 25, 2024

Yeah, I felt this was likely discussed heavily but I just couldn’t point to where, and I wasn’t really involved in variables discussion (by choice).

from homebrewery.

Gazook89 avatar Gazook89 commented on September 25, 2024

Talked about this again in gitter. Giving some more examples of how little templates could be made:

[heroBlock]:
{{hero
## $[hero]
$[tagline]
}}



[hero]:Superman

[tagline]:Man of Steel

$[heroBlock]



[hero]: Batman

[tagline]: The Dark Knight

$[heroBlock]

or

[lootTable]:
##### Loot Table
| Item              | Roll  |
|:------------------|:-----:|
| $[loot1]          | 1     |
| $[loot2]          | 2     |
| $[loot3]          | 3     |
| $[loot4]          | 4     |
| $[loot5]          | 5     |
| $[loot6]          | 6     |



[loot1]: Pair of dice

[loot2]: Bottle of water

[loot3]: One torn sock

[loot4]: A magic card

[loot5]: A spoon

[loot6]: Twelve turtle doves


$[lootTable]

from homebrewery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.