Because if(_)then(_)else(_) is treated by minigrace as a special from, not as a request, there are a number of places where you can't use it.
Specifically, this source code won't compile:
if (aSourceNode.numArgs == 0) then {
ast.memberNode.new(request, receiver)
} else {
ast.callNode.new(receiver, aSourceNode.parts)
}.setScope(nodeScope)
As I attempted to write on line 198 of identifierresolution.
The root problem is that minigrace's identifier resolution uses case analysis, and simply does not consider this case. If it used OOP and method dispatch, this would not be an issue.
No re-writing of the receiver is necessary, so nothing has to be done — but the case needs to be recognized.
Because
if(_)then(_)else(_)
is treated by minigrace as a special from, not as a request, there are a number of places where you can't use it.Specifically, this source code won't compile:
As I attempted to write on line 198 of identifierresolution.
The root problem is that minigrace's identifier resolution uses case analysis, and simply does not consider this case. If it used OOP and method dispatch, this would not be an issue.
No re-writing of the receiver is necessary, so nothing has to be done — but the case needs to be recognized.