Re:An Opinionated Treatise on Cosmos, a New Programming Lang...
by mccosmos on Tuesday November 18, 2014 @10:18AM
(#8624156)
That would get translated into
(s="a" and x=2) or true
There is an implicit else.
Re:An Opinionated Treatise on Cosmos, a New Programming Lang...
by ajuc on Tuesday November 18, 2014 @10:29AM
(#8624220)
Isn't it a little useless?
I would think if would work better if it was transformed into implication.
if (p)
q
would be (p => q)
and if p
q
else
r
would be (p=>q) and (~p => r)
Anyway, not my language.
Minor nitpick: what
translates into? or ?Because your example with if .. else .. seems to indicate the first one and that's weird.