Talk:Quine

From Rosetta Code
Revision as of 16:13, 18 November 2007 by rosettacode>Dirkt (Proposal to delete this task)

I did not read up as fully as I should have on this task. The program is to output its own source without accessing files. This makes the examples here incorrect. See the wiki for more clarification. --Mwn3d 20:32, 17 November 2007 (MST)

I don't think this task does illustrate the comparative features of different languages very well. As the Wikipedia article explains, one way to solve this task that will work in every language is put the program code into a string, together with some mechanism to replace it at a special location with a copy of itself. For languages which keep a more-or-less one-to-one representation of the code around at runtime (Lisp, Smalltalk, Forth, etc.), it just boils down to accessing this representation. Smaller solutions are in danger of becoming an exercise in obfuscation, or at least become unreadable very quickly. And the examples seen now which mostly access files are obviously missing the point.

So I'd propose to delete this task, and replace it with a task that shows how to access (and maybe manipulate) code at runtime for languages that support it. The general solution can be subsumed by task(s) that show how string manipulation works. Dirk Thierbach 18 November 2007