View Single Post
Old 10-15-2020, 02:57 PM   #42
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,482
Karma: 8025704
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by compurandom View Post
And I do think SFM is useful -- it's significantly shorter in the context of just pulling tags and doing minor changes to format them, like in plugboard. But now that the other two are more clear to me, I'll probably use them for everything else.
If I had it to do again I would get rid of SFM, making TPM the default. This would remove the need for the :' and '} stuff, and require using quotes for constants and '$' for the field value.

Some benefits: it would get rid of the confusion around nested functions. It would normalize specifying arguments to functions. It would remove the restriction on zero-parameter functions. It would make escaping commas and quotes more rational. It would make much more of the template language available by default.

The cost: adding '$' almost everywhere and adding quotes in some places.

I have looked at whether I could automatically convert SFM templates to TPM templates. I think I could, but it is certain that in some cases the conversion would fail. Then what? Confusing millions of users is seldom a good idea so (for the moment at least) I am not going there.

Another example: we just went through this calculation with the soon-to-be-released feature combining small tag browser groups together when using grouping by first letter. My initial take was "Oh no, we can't set a default that changes calibre's behavior." My second take was "If we set a default that might change behavior then a) people will know about the feature (discoverability), and b) it is easy to revert in Preferences." Kovid asked about and I ended up choosing the second, setting the threshold to 5, hoping that we won't see too many knives.
chaley is offline   Reply With Quote