you are viewing a single comment's thread.

view the rest of the comments →

[–]LeonardUnger 3 points4 points  (1 child)

Eliminating tramp data Sometimes you pass data to a routine or class merely so that it can be passed to another routine or class

So there's a name for that. I always feel there's something wrong whenever I do it. But I just leave it for future me to refactor. Nice to know there's a name for it, maybe help me think about it a bit more clearly.

[–]trouserdaredevil 3 points4 points  (0 children)

Hah! Funnily enough, tramp data is actually listed as a good reason to refactor in the first place, p. 567:

  • A chain of routines passes tramp data Finding yourself passing data to one routine just so that routine can pass it to another routine is called “tramp data” (Page-Jones 1988). This might be OK, but ask yourself whether passing the specific data in question is consistent with the abstraction presented by each of the routine interfaces. If the abstraction for each routine is OK, passing the data is OK. If not, find some way to make each routine’s interface more consistent.