Closed macta closed 1 month ago
The ticket associate with this PR is https://github.com/pharo-project/pharo/issues/16753
How would we feel about renaming StRewriterDemoRules to StRewriterTemplateRules, as they are more than demo rules, there are some great ones in there and potentially other libraries could add to them ? Could do it in this PR or create a new issue - whatever is easier
Yes tell me when you need that I have a look.
@Ducasse
Yes tell me when you need that I have a look.
Not sure what you are referring to here ? And I'm not quite sure how to complete the idea in this thread and move things forward.
I think we all agree its a good idea to make the rules more extensible - so making them pragma based is an easy enhancement to what we have.
The question is what to call the pragma (the feeling seems to be that its name should match the class holding the rules) - so should I just rename that Demo class to StRewriterTemplateRules, and the pragma
Happy to do that and then we can move on.
In a seperate PR I can also update the docs for Rewriter - and potentially move them from a window into the normal PharoDocs format and add a paragraph with an example from my email that really helped me better understand and pull the ideas together.
I've realised the rewriter is a much underused feature - and its very cool.
Call it ruleDemo?
Call it ruleDemo?
I think the word Demo trivialises what they do/are - many of the rules in that list are real things, you can use them now - I would say they are templates and we want projects to included templates that others should use. Thats why I think that holding class is badly named as well - particularly as the real RewriteTool links in to show them?
But if you prefer
This topic confirms to me again: if one takes it serious the hardest part in programming is to find proper (intention revealing) names :)
Then call them exampleRule
The StRewriterDemoRules class (which is badly named - and should be called StRewriterSampleRules or StRewriterTemplateRules)
I agree, we can find a better name. StRewriterSampleRules
seems better for me.
Simple change to allow easy way to add extra rules that can appear in the UI