Skip to main content
55 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 14, 2020 at 21:12 review Close votes
Aug 19, 2020 at 3:04
Aug 14, 2020 at 20:39 answer added Beefster timeline score: 0
Apr 23, 2020 at 15:04 comment added Robert In some languages, code generation is built in: C and C++ have the preprocessor, there are various CSS preprocessors, Typescript can be transpiled to JavaScript.
Dec 6, 2017 at 5:11 history tweeted twitter.com/StackSoftEng/status/938274754934575107
Dec 4, 2017 at 7:34 comment added Frames Catherine White @Restioson in a functional language code isn't data. First class functions mean exactly that: Functions are data. And not necessarily particularly good data: you can't necessarily mutate them just a bit (like mutate all additions within the functions into subtractions, say). Code is data in Homoiconic languages. (most homoiconic languages have first class functions. But the reverse is not true.).
Dec 3, 2017 at 20:52 answer added Kevin Krumwiede timeline score: 0
Dec 3, 2017 at 9:04 comment added Restioson Maybe you come from a language which doesn't have many functional elements, but in many languages functions are first class -- you can pass them around, so in those types of languages code is data, and you can treat it just like that.
Dec 3, 2017 at 1:55 comment added vextorspace I've used source code generation to handle the interface between multiple systems for the communication systems so that I didn't have to write it in two places - I wrote one set that outputted the code in both system's languages. I found it kept me from allowing the two systems to accidentally get out of sync.
Dec 2, 2017 at 16:41 answer added daramarak timeline score: 3
Dec 2, 2017 at 2:52 comment added Dave Cousineau I think the "opposite" of data is not code, but process. Code fed to a compiler is data, and the compilation is the process, even though the compiler itself is also data/code being fed to a process (the computer).
Dec 2, 2017 at 1:54 answer added Cort Ammon timeline score: 0
Dec 2, 2017 at 1:11 comment added Charles Duffy ...whether your high-level language is transformed into a low-level language and then into an IL in your compiler and then from there into assembler and from there to machine language, or goes via pretty much the same pipeline but without the lower-level language (HLL -> IL -> assembly -> opcodes)... why is this a difference that even matters to you? You still have the same end result of high-level-language going in -> machine code coming out.
Dec 2, 2017 at 1:04 comment added Charles Duffy @Utku, the better reasons to do code generation often relate to wanting to provide a higher-level description than your current language can express. Whether the compiler can or can't create efficient code doesn't really have anything to do with it. Consider parser generators -- a lexer generated by flex or a parser generated by bison will almost certainly be more predictable, more correct, and often faster to execute than equivalents hand-written in C; and built from far less code (thus also being less work to maintain).
Dec 1, 2017 at 23:33 answer added JacquesB timeline score: 1
Dec 1, 2017 at 21:33 comment added Utku @CortAmmon The compiler's duty is to take a code written in human-readable form and convert it to machine-readable form. Hence, if the compiler cannot create a code that is efficient, then the compiler is not doing its job properly. Is that wrong?
Dec 1, 2017 at 21:19 comment added Cort Ammon Can you explain why you think "If it's being done for performance reasons, then that sounds like a shortcoming of the compiler." I don't feel it sounds that way at all, so I'd like to hear more about what you're saying.
Dec 1, 2017 at 16:44 comment added user88637 en.wikipedia.org/wiki/Code_as_data , Lisp, FP, scripting, metaprogramming, Von Neumann/modified Harvard architecture etc. It's been covered ad nauseam. tl;dr the distinction "source code" vs "output code", "code" vs "data" etc. are meant to simplify things. They should never be dogmatic.
Dec 1, 2017 at 15:23 comment added UselesssCat A term associated with the generation of code is metaprogramming
Dec 1, 2017 at 15:13 answer added John Bollinger timeline score: 0
Dec 1, 2017 at 13:35 history notice added maple_shaft Needs detailed answers
S Dec 1, 2017 at 13:34 history mod moved comments to chat
S Dec 1, 2017 at 13:34 comment added maple_shaft Comments are not for extended discussion; this conversation has been moved to chat.
Dec 1, 2017 at 0:09 answer added Bill K timeline score: 0
Nov 30, 2017 at 21:59 history edited user22815 CC BY-SA 3.0
Removed fluff.
Nov 30, 2017 at 17:36 audit First posts
Nov 30, 2017 at 17:36
Nov 30, 2017 at 17:04 answer added Kaz timeline score: 0
Nov 30, 2017 at 9:43 answer added S.D. timeline score: 0
Nov 30, 2017 at 4:29 answer added Frames Catherine White timeline score: 1
Nov 30, 2017 at 1:57 answer added jmoreno timeline score: 0
Nov 29, 2017 at 20:41 answer added Aaron timeline score: 8
Nov 29, 2017 at 18:23 answer added John Bode timeline score: 4
Nov 29, 2017 at 14:35 history protected CommunityBot
Nov 29, 2017 at 14:16 answer added Dan Mills timeline score: 13
Nov 29, 2017 at 12:37 answer added Džuris timeline score: 6
Nov 29, 2017 at 12:36 answer added rosuav timeline score: 2
Nov 29, 2017 at 12:06 answer added Graham timeline score: 7
Nov 29, 2017 at 8:26 history edited Robbie Dee CC BY-SA 3.0
edited body; edited title
Nov 29, 2017 at 8:03 answer added Hristo Vrigazov timeline score: 6
Nov 29, 2017 at 7:43 answer added kevin cline timeline score: 7
Nov 29, 2017 at 7:40 answer added AnoE timeline score: 77
Nov 29, 2017 at 7:35 answer added jaskij timeline score: 7
Nov 29, 2017 at 7:22 answer added gnasher729 timeline score: 1
Nov 29, 2017 at 7:19 answer added Doc Brown timeline score: 46
Nov 29, 2017 at 5:29 review Close votes
Dec 6, 2017 at 11:12
Nov 29, 2017 at 5:16 answer added Maybe_Factor timeline score: 13
Nov 29, 2017 at 5:01 history edited Utku CC BY-SA 3.0
added 14 characters in body; edited title
Nov 29, 2017 at 4:47 answer added candied_orange timeline score: 46
Nov 29, 2017 at 4:28 answer added user204677 timeline score: 13
Nov 29, 2017 at 4:22 history edited Utku CC BY-SA 3.0
added 181 characters in body
Nov 29, 2017 at 4:17 answer added Erik Eidt timeline score: 148
Nov 29, 2017 at 4:17 history edited Utku CC BY-SA 3.0
deleted 8 characters in body
Nov 29, 2017 at 4:11 history edited Utku CC BY-SA 3.0
added 208 characters in body; edited title
Nov 29, 2017 at 3:56 history edited Utku CC BY-SA 3.0
edited title
Nov 29, 2017 at 3:51 history asked Utku CC BY-SA 3.0