Skip to main content
12 events
when toggle format what by license comment
Aug 17, 2020 at 12:55 history made wiki Post Made Community Wiki by maple_shaft
Aug 2, 2018 at 11:30 history edited AnoE CC BY-SA 4.0
deleted 43 characters in body
Aug 2, 2018 at 11:28 comment added AnoE @Pharap, "surely this has been possible in C++ for over two decades" ... I had to chuckle a little bit; it is about 2ish decades since I last coded C++. :) But my sentence about C++ was formulated badly anyways. I have changed it a bit, it should be clearer what I meant, now.
Aug 2, 2018 at 11:22 comment added Caleth "allocate a char array, fill it with machine code and then cast a pointer to the first element to a function pointer and then run it?" Apart from being undefined behaviour, it's the C++ equivalent of "generate the bytecode on the fly". It falls into the same category of "not considered by ordinary programmers"
Aug 2, 2018 at 11:20 comment added Pharap @Caleth I don't understand your comment. Could you clarify what you mean?
Aug 1, 2018 at 15:35 comment added Caleth @Pharap yes but that's back in the realm of "would not be something a random programmer would do just inbetween writing a few lines of domain code"
Dec 3, 2017 at 0:27 comment added David Richerby As soon as the question includes the word "pattern", you know it's not theoretical computer science!
Dec 2, 2017 at 19:43 comment added Pharap "(or was, I have not kept up with modern C++ features...)" surely this has been possible in C++ for over two decades thanks to function pointers? I haven't tested it but I'm sure it should be possibly to allocate a char array, fill it with machine code and then cast a pointer to the first element to a function pointer and then run it? (Assuming the target platform doesn't have some security measure to stop you doing that, which it might well do.)
Dec 1, 2017 at 5:18 comment added Noumenon These days, is it possible in Java to create dynamic tables from a DB? Or only by using an ORM?
Nov 29, 2017 at 14:17 history edited AnoE CC BY-SA 3.0
deleted 73 characters in body
Nov 29, 2017 at 13:57 comment added Panzercrisis I think this is better than the more up-voted answers. In particular, the example mentioned with Java and database programming does a much better job of actually addressing why code generation is used and is a valid tool.
Nov 29, 2017 at 7:40 history answered AnoE CC BY-SA 3.0