Talk:Quine: Difference between revisions

m
Line 52:
 
== Second scheme example correct? ==
I have some doubt about the correctness of the second scheme example. It only works when entered into an interpreter. When compiled there will be no output. The reason for this is that the expression evaluates to a result which is identical to the original expression. However, I realise that this is not the same as simply entering a constant expression like <code>0</code>, which will evaluate to itself. When the given expression is evaluated, the lambda function will be applied to the argument that follows, resulting in an expression that is identical to the original expression. The problem description states that the program must output its own source. The given example doesn't produce any output by itself (generated by <code>display</code> in scheme). How should we handle this? --[[User:Dsnouck|Dsnouck]] 14:16, 26 May 2010 (UTC)
 
I have some doubt about the correctness of the second scheme example. It only works when entered into an interpreter. When compiled there will be no output. The reason for this is that the expression evaluates to a result which is identical to the original expression. However, I realise that this is not the same as simply entering a constant expression like <code>0</code>, which will evaluate to itself. When the given expression is evaluated, the lambda function will be applied to the argument that follows, resulting in an expression that is identical to the original expression. The problem description states that the program must output its own source. The given example doesn't produce any output by itself (generated by <code>display</code> in scheme). How should we handle this?
Anonymous user