Hi Mat

Excellent, you're following a line of thought that has preoccupied me for a 
long time.

Firstly, I think about this stuff in a cloud headed “what comes after 
TiddlyWiki 5?” both because these sorts of changes are often challenging from a 
backwards compatibility perspective, and more importantly because now we're 6 
years after started to create TiddlyWiki 5 I can recognise many fundamental 
elements of the design that I would do differently if I knew then what I knew 
now. I'm by no means eager to start things from scratch all over again, but its 
still interesting to assemble my thoughts on critiquing the current design of 
TiddlyWiki.

Anyhow, where I've got to in terms of this specific issue is to reformulate it 
as a slightly different question: do variables and tiddlers have to be 
different things? As you note, both the double angle bracket syntax and the 
double curly braces syntax get some text from somewhere and wikify it; the only 
thing that differs is where the text comes from.

You'll recall that the point of variables is that they can have different 
values across different parts of the widget tree; in contrast, the value of a 
tiddler is consistent across the tree. We need something like variables for the 
list widget to work, so that there is a way for the repeated chunk of wikitext 
to access the name of the item that it represents.

So, the solution I've been considering is to unify tiddlers and variables. The 
idea would be to have a new widget <$tiddler-store> that acts as a tiddler 
container. When a widget needs to read the value of a tiddler it sends a 
message to its ancestors until it finds one that responds with the value for 
that tiddler.

This structure is attractive because it's a bird that kills many stones. The 
cascading action we get between nested tiddler stores is precisely the same 
structure that we have with ordinary tiddlers being backed by shadow tiddlers. 
We'd have a stack of tiddler stores corresponding to each plugin and then the 
main tiddler store at the top. The list widget would act as a tiddler store for 
the index variable.

Pulling back up to your original question, the issue we'd now have is how to 
name those tiddlers that are acting as variables. Simple names like 
"currentTiddler” wouldn't be great because we'd be stomping all over the users 
tiddler name space. One solution would be to use a prefix for variables, such 
as "$:/variable/currentTiddler". Then the difference between {{Foo}} and 
<<Foo>> would be that the latter would be equivalent to {{$:/variable/Foo}}.

Best wishes

Jeremy



--
Jeremy Ruston
jer...@jermolene.com
http://jermolene.com

> On 7 Aug 2017, at 08:07, @TiddlyTweeter <tiddlytwee...@assays.tv> wrote:
> 
> Matt
> 
> Very useful thoughts for someone like me.
> 
> One thing missing, at least I can't find one, is a CRIB sheet of existing 
> syntax ... something along the lines of those that Tobias did for Filters and 
> WikiText examples.
> 
> My single biggest issue as an idiot is that I forget what all the variant 
> brackets mean so have to go fish around and look them up repeatedly. I've 
> found it hard to consolidate what I know in a way that becomes intuitive. 
> Crib sheets help people like me get out fog.
> 
> The rest of your points I think I understand, but, before one starts changing 
> fundamentals, I'm wondering is just gathering all the syntax on one "page" 
> with simple examples might not do what is needed.
> 
> Best wishes
> Josiah
> 
> Mat wrote:
>> 
>> I just want to bounce this thought to hear if it makes sense:
>> 
>> The idea is about how to simplify the syntax, or at least make it easier to 
>> learn. 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWikiDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to tiddlywikidev+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywikidev@googlegroups.com.
> Visit this group at https://groups.google.com/group/tiddlywikidev.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywikidev/9ed2811c-906c-4e8b-a3ec-1615fc74c71a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/3072F3B4-3FAE-4A86-B832-A850E09C8929%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to