Click here to Skip to main content
15,893,722 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: To all those who may be lonely on this day Pin
Cp-Coder25-Dec-19 4:40
Cp-Coder25-Dec-19 4:40 
GeneralRe: To all those who may be lonely on this day Pin
Eddy Vluggen27-Dec-19 9:44
professionalEddy Vluggen27-Dec-19 9:44 
GeneralRe: To all those who may be lonely on this day Pin
Cp-Coder27-Dec-19 15:25
Cp-Coder27-Dec-19 15:25 
GeneralThis Christmas I give you... Pin
Super Lloyd25-Dec-19 3:03
Super Lloyd25-Dec-19 3:03 
Questionanyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 1:35
mvahoney the codewitch25-Dec-19 1:35 
AnswerRe: anyone have any ideas for this problem? Pin
Daniel Pfeffer25-Dec-19 1:51
professionalDaniel Pfeffer25-Dec-19 1:51 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 1:53
mvahoney the codewitch25-Dec-19 1:53 
AnswerRe: anyone have any ideas for this problem? Pin
Greg Utas25-Dec-19 2:18
professionalGreg Utas25-Dec-19 2:18 
It's hard to answer this without looking at your code, and I haven't used C# and the other things that you write about.

I also don't know what you mean by procedural vs OO. OO still has procedures, but ideally they're small, with many being private or protected. If you're saying that your code looks more like a C free-for-all than C++, my guess is that you haven't yet found a division of responsibilities that yields good encapsulation. And it might just be that there isn't one.

I also don't know what the "input" to your code generator is. When I parse C++ to do static analysis, I also "execute" it using operand and operator stacks, which can emit a sort of stack machine pseudo-code to verify that the code was properly understood. My guess is that it wouldn't be difficult, although lots of work, to turn this into (inefficient) machine code. But this isn't at the same level of abstraction as generating class definitions, like you are.

You say that you can read your code easily, so it doesn't much matter if you think you'd still be able to pick it up again, with modest effort, in a year. If this is the first time you're doing code generation, be patient. Soon you'll probably have an epiphany about how it should be structured, presenting you with the painful choice between leaving it alone and doing a big refactoring!

GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 2:25
mvahoney the codewitch25-Dec-19 2:25 
GeneralRe: anyone have any ideas for this problem? Pin
Greg Utas25-Dec-19 2:45
professionalGreg Utas25-Dec-19 2:45 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 2:46
mvahoney the codewitch25-Dec-19 2:46 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 2:51
mvahoney the codewitch25-Dec-19 2:51 
GeneralRe: anyone have any ideas for this problem? Pin
Greg Utas25-Dec-19 3:09
professionalGreg Utas25-Dec-19 3:09 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 3:12
mvahoney the codewitch25-Dec-19 3:12 
AnswerRe: anyone have any ideas for this problem? Pin
Super Lloyd25-Dec-19 3:00
Super Lloyd25-Dec-19 3:00 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 3:03
mvahoney the codewitch25-Dec-19 3:03 
GeneralRe: anyone have any ideas for this problem? Pin
Super Lloyd25-Dec-19 3:12
Super Lloyd25-Dec-19 3:12 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 3:14
mvahoney the codewitch25-Dec-19 3:14 
AnswerRe: anyone have any ideas for this problem? Pin
User 1106097925-Dec-19 3:36
User 1106097925-Dec-19 3:36 
AnswerRe: anyone have any ideas for this problem? Pin
PIEBALDconsult25-Dec-19 5:41
mvePIEBALDconsult25-Dec-19 5:41 
AnswerRe: anyone have any ideas for this problem? Pin
Jon McKee25-Dec-19 19:28
professionalJon McKee25-Dec-19 19:28 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 19:51
mvahoney the codewitch25-Dec-19 19:51 
AnswerRe: anyone have any ideas for this problem? Pin
Dan Sutton27-Dec-19 9:19
Dan Sutton27-Dec-19 9:19 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch28-Dec-19 0:02
mvahoney the codewitch28-Dec-19 0:02 
AnswerRe: anyone have any ideas for this problem? Pin
MikeCO1028-Dec-19 3:47
MikeCO1028-Dec-19 3:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.