Hi @GoldenSilver. This is very exciting. I like the fact that you used *script as an escape hatch. It means changes to the core of CS are limited and may require less effort to be integrated for publication. I have a few questions/suggestions:
-
Dynamic styles are very nice. From what I see, CS renders all the page in the same “text” div. How can you apply the style selectively? Does *applyStyle change the whole page? Would it be possible to style specific images or paragraphs in the page?
-
I love the object support. Can you explain in more details why you can’t simply do ${instance[field]}. If you keep it simple, you can *set instance_field value and get it done.
-
In “predicate” shouldn’t variables be referenced as this.stats.VARNAME? This is what works for me. I believe this.created doesn’t hold the value.
-
What’s the cost of sorting operation? Do you have to copy the simulated array into a JS array, sort it and copy it back? What about a syntax to just use native arrays directly (similar to your supplyInstance for objects)? I have some thoughts here: How to deal with arrays (choice #5, and use of tooling to help developers)
-
Can you resize or add elements to arrays? I think it would make them usable in a broader context. Eg. infinite growing log. In one of my demos The Dungeon of Lamurloq (first-person POV dungeon crawler) I use a trick to programmatically allocate an array of given size (from a variable).
-
Yes, CONSOLE. Thanks!
-
Yes, dynamic creation/removal of variables.
-
Functions. Did you look into supporting real, scoped functions? CS gosub can mess up your state if you are not careful.
Thanks for sharing this. I hope it grows into something widely adopted.