jtree icon indicating copy to clipboard operation
jtree copied to clipboard

Move away from single core functions, switch to decorators across method calls that better explain what the method is doing

Open breck7 opened this issue 4 years ago • 1 comments

In grammar langs we have execute methods.

But then the problem is execute is not a very helpful name.

In fact, it's a pretty terrible name.

So we should have a decorator command function strategy. So instead of a Stamp file node having an execute method, it should have something like a touchFileCommand. Generic code paths that now look for a single execute method recursively should instead look for the first Command function and call that.

This way, when I return to a language a few years later, I'll be able to know what a function does by reading the name, and won't have to wonder "wtf does execute mean for a file node?"

breck7 avatar Feb 07 '21 14:02 breck7

related: https://github.com/publicdomaincompany/jtree/issues/137

breck7 avatar Aug 13 '21 22:08 breck7

Just doing this gradually as we go.

breck7 avatar Jun 23 '24 18:06 breck7