I agree. :)
On 03/10/2012 11:01 AM, Ivan Čukić wrote: > Hi, > > A RFC regarding the query API for Nepomuk in KF5. > > Proposal: > > Methods that modify a Term and currently return void should return a > reference to (*this) that is Term &. > > Reasoning: > > Database query languages are functional in nature, so should be the > query building apis like this one. > > By defining the method return type as void, we need to define separate > variables if we want to change some term before inclusion into the > main term (non-functional approach): > > ComparisonTerm related = ComparisonTerm(something, something); > related.setInverted(true); > ResourceTypeTerm(NFO::FileDataObject()) && related; > > Instead of being able to write it as: > > ResourceTypeTerm(NFO::FileDataObject()) && > ComparisonTerm(something, something).setInverted(true) > > I'm in a hurry, so this is not really worded properly, but you'll get > the gist I think :) > > _______________________________________________ Nepomuk mailing list [email protected] https://mail.kde.org/mailman/listinfo/nepomuk
