511 reputation
2612
bio website
location
age 26
visits member for 3 years, 9 months
seen yesterday

Apr
2
awarded  Good Question
Apr
2
revised Method extraction vs underlying assumptions
added 770 characters in body
Apr
2
revised Method extraction vs underlying assumptions
added 197 characters in body
Mar
24
comment Method extraction vs underlying assumptions
Recently I was just in a situation that would be ideal for this from architecture perspective. I wrote a software renderer with a renderer class and a public render method, which had a LOT of context that it used to call other methods. I contemplated creating a separate RenderContext class for this, however, it just seemed enormously wasteful to allocate and deallocate this project every frame. github.com/golergka/tinyrenderer/blob/master/src/renderer.h
Mar
24
comment Method extraction vs underlying assumptions
This is an excellent and thought-provoking answer, thank you. (Not to say that other answers are in any way bad, of course). I won't mark the question as answered just yet, because I really like the discussion here (and it tends to cease when answer is marked as answered) and need time to process it and think about it.
Mar
24
comment Method extraction vs underlying assumptions
"What is that context?" just to clarify, I mostly meant private state of the object that this method is called on. I guess it's included in the second category.
Mar
24
awarded  Popular Question
Mar
23
awarded  Nice Question
Mar
23
awarded  Yearling
Mar
23
revised Method extraction vs underlying assumptions
edited title
Mar
23
awarded  Commentator
Mar
23
awarded  Editor
Mar
23
comment Method extraction vs underlying assumptions
@gnat this question has nothing to do about my peers; also, I've added an edit about why this question is not about duplicate of the ones you linked.
Mar
23
revised Method extraction vs underlying assumptions
added 385 characters in body
Mar
23
comment Method extraction vs underlying assumptions
@gnat there are other related questions linked from there, but none of these discuss the fact that this code may rely on specific assumptions that are valid only in caller's context.
Mar
23
comment Method extraction vs underlying assumptions
@gnat the question you linked to discusses whether or not to extract functions at all, while I don't question it. Instead, I question the most optimal method to do it.
Mar
23
asked Method extraction vs underlying assumptions
Mar
23
awarded  Peer Pressure
Dec
5
awarded  Famous Question
Aug
6
awarded  Yearling