> Some core functions were initially created as wrappers to provide > useful entry points for plugins to do what they need. While the core > code isn't currently using the 'sortfield' parameter, it can still be > used by plugins that have implemented their own alternative handling > for getting and sorting the missing tiddlers list. Even though
In the current form though, would this not require a rewrite of the entire getMissingTiddlers function? In which case the developer can rewrite the parameters. > getMissingTiddlers() only returns tiddler *titles* (not tiddler > *objects*), those titles can still be sorted by other criteria > *before* being returned. but currently they cannot. the sortfield is not passed anywhere so they are stuck with doing a sort once returned (unless they reimplement the entire function) >Once returned, sorting by other than the > title text can become costly, requiring lookups of each tiddler to get > the associated data values to sort by. Depends on implementation... > however, the principle is very important: > removing existing parameters from TWCore functions should NOT be done > for mere "cleanup" reasons. There should always be *compelling* > technical reasons for API changes, and just because the TWCore isn't > using a parameter, doesn't mean that it isn't there for a reason. I disagree. When encountering a function for the first time I look at the parameters that I can use. If parameters are not used anywhere within the function, they are not serving any purpose. but they can be *very* confusing to someone reading the code (unless there is a comment to why they exist). Assumptions might also be made from the code - I might think I can pass a sort field and experience unexpected results. I would argue the core is already extremely difficult to read for a newcomer such as Colm. If the existence of this parameter is to allow sorting then the function should pass the field somewhere - for example the function might create a list of tiddlers and run sortTiddlers on the result with the sortfield and then return the tiddler titles. So I'd suggest either 1) we remove it as first suggested 2) rewrite getMissingLinks to make use of this parameter -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tiddlywikidev?hl=en.
