Skip to main content

Questions tagged [code-generation]

Filter by
Sorted by
Tagged with
1 vote
3 answers
403 views

I need to design a code generator system that produces serialisation/deserialisation libraries for multiple languages running on multiple platforms. Hard Constraints I need this to capture a pre-...
avigt's user avatar
  • 133
0 votes
1 answer
110 views

HINT: the purpose of this question is to identify downsides for the scenario described. If something is a downside, then it should be quantifiable and it should clearly have a negative impact. ...
pgpb.padilla's user avatar
-3 votes
2 answers
409 views

Github Copilot got update yesterday (2023 St. Valentine) https://github.blog/2023-02-14-github-copilot-now-has-a-better-ai-model-and-new-capabilities/ but still no information for its use in the ...
TomR's user avatar
  • 1,029
7 votes
2 answers
2k views

The Java project I am working on currently has a complicated folder structure, and to add a new functionality, one needs to add many .java files in different places in order to let it work in our ...
teamol's user avatar
  • 1
0 votes
2 answers
270 views

I'm developing a commercial closed-source application that will have a user-interface, and the back-end will be generating C++ code that needs to be compiled to produce a final end result. When I ...
Mode77's user avatar
  • 121
0 votes
0 answers
898 views

I googled this and found questions like "How to use Protobuf message as java class without a java outer class?" (https://stackoverflow.com/questions/60312156/how-to-use-protobuf-message-as-...
Matt Welke's user avatar
-6 votes
1 answer
230 views

First, the most obvious grouse someone has against this I can think of is the intricacies of an actual method. It's not enough to merely ensure no errors are thrown. Functions usually contain ...
I Want Answers's user avatar
8 votes
3 answers
2k views

In this and this stack overflow questions, the answers state that C as a compiler backend is a bad idea. But why? C has many compilers that can heavily optimize it. Every platform has a compiler ...
Kied Llaentenn's user avatar
1 vote
0 answers
119 views

It seems pretty common knowledge that code is read far more than it is written. Does this mean that if a tool produces code that's checked in, then it's a net negative (saves the author some time in ...
user avatar
3 votes
1 answer
1k views

In my company, I'm currently working on a project with some (REST) web services involved. The development is based on the OpenAPI specification and the Swagger tooling. The target platform is an ...
Matthias Preu's user avatar
4 votes
3 answers
875 views

where I currently work, there is a team that uses code-generation to generate slight variations of a program. I find this a little bit awkward. I can imagine using code generators that produce complex ...
Zavulon's user avatar
  • 51
0 votes
1 answer
1k views

Presume this situation: Max Number of 256 key slots. Key slots are defined by a struct, and a variable for each (256) has to exist. User defines which keys slots are active at initiation (in my ...
Anon's user avatar
  • 3,649
1 vote
3 answers
748 views

I have written a code generator for my company, that basically has the following workflow: entity xml definition | v gets ...
Dominik Reinert's user avatar
6 votes
3 answers
872 views

I'm writing a compiler that compiles to C. This means that most of the time I piggyback on top of C for optimisations and generating code for multiple platforms. Right now I can think of a few ...
flooblebit's user avatar
4 votes
3 answers
3k views

How is Bytecode "parsed"? It is my understand that Bytecode is a binary, intermediate representation of the syntax of a given programming language. Certain programming languages convert their source ...
Chris's user avatar
  • 2,860
6 votes
1 answer
462 views

I'm writing a compiler that compiles to C, one thing I'm attempting to do is implement a construct like Rust's match: // { some function let mut foo = 32; match foo { 3 => return "...
Jon Flow's user avatar
  • 383
0 votes
2 answers
126 views

Have been hired to modernize an old binary compiler that has been forgotten since a few years by people who have died already. The compiler has a parser, an objectmodel and a generator of ...
Grim's user avatar
  • 262
10 votes
5 answers
4k views

Consider a situation where a class implements the same basic behavior, methods, et cetera, but multiple different versions of that class could exist for different uses. In my particular case, I have a ...
Parker Hoyes's user avatar
2 votes
1 answer
308 views

(preface - boring stuff, feel free to skip down to the implementation details) I need to provide exception handling to a language I am working on. It "compiles" to a subset of C, and since I ...
dtech's user avatar
  • 763
1 vote
0 answers
152 views

I will approach this from two directions (+ raw HTML itself being de-facto third) Proprietary HTML-generating code Code generating facilities provided by a popular library Proprietary HTML-generating ...
Dennis's user avatar
  • 8,267
33 votes
6 answers
10k views

Why not have the compiler take a program like this: function a(b) { return b^2 }; function c(b) { return a(b) + 5 }; and convert it into a program like this: function c(b) { return b^2 + 5 }; ...
moonman239's user avatar
  • 2,063
1 vote
2 answers
222 views

Lately I've been playing with CSS (and other web technologies). I'm a non-web programmer, and probably this is influencing way too much my approach. I found CSS syntax very limited, thus gave a shot ...
peoro's user avatar
  • 273
22 votes
4 answers
71k views

Is there an easy way to visualize the step between assembling code to machine code? For example if you open about a binary file in notepad you see a textually formatted representation of machine code....
user12979's user avatar
  • 375
6 votes
4 answers
2k views

I am looking to create a simple code generator to convert XSD definitions to C# classes. This is partly as a learning exercise, but I would also like to get some practical use out of it eventually. ...
Robert Harvey's user avatar
2 votes
4 answers
2k views

We have a project that was written over a period of 2 years, but has a poorly designed architecture and not unit tests. The software works well, but we're at the point where we want to refactor some ...
zavg's user avatar
  • 121