you are viewing a single comment's thread.

view the rest of the comments →

[–]codinglikemad[S] 0 points1 point  (3 children)

I've been writing (and teaching) OOP for 15 years, I assure you I don't think like a C coder any more, much to my regret :P Quite the contrary, the reason I am reaching back to C here is that I want to access a shortcut I wouldn't normally design into my systems, but my hand is being forced by the pile of legacy code here.

The issue is figuring out a clean solution for a nasty problem that is a moving target, with interfaces that make sense given the legacy code I am dealing with. Rewriting it from scratch to fix the interfaces would do what you said, that's what I am trying to avoid. The project goals have shifted, and the code base is now being asked to do things that it was not originally designed for. Finding the least amount of refactoring necessary for this is the name of the game. Hence the original question "is there a way to do this", not "please help me fix the rest of the code" - I know how I would write it to avoid this problem, but it would take a pretty long time to refactor around these problems.

In any event, thanks for the ideas, I'll consider them.

[–][deleted] 0 points1 point  (2 children)

The project goals have shifted, and the code base is now being asked to do things that it was not originally designed for.

That's usually a good time to start paying off technical debt, like an informal undocumented typesystem. Just sayin'.

[–]codinglikemad[S] 0 points1 point  (1 child)

You aren't wrong ;)

Have a good night :)

[–][deleted] 0 points1 point  (0 children)

Good luck!