I've been working on something similar for the SharpBASIC compiler, but instead of using IF in an expression, a LET statement is used allowing for one or more 'on' branches:
let s
on x < y is "Foo";
on x > y is "Bar" else "Nothing";
end
print(s);
It differs from a case/switch block in that it's purely an assignment statement. This construct clearly separates assignment from boolean evaluation.
This wouldn't work for multiple reasons, first, is is already defined as an operator, meaning it can't be used to follow up on an expression. Especially in this case where it would introduce additional ambiguity:
on MyObject = OtherObject is TMyClass
In this case OtherObject is TMyClass is a perfectly normal expression.
Second in Pascal you can't define variables in the code section meaning such a let construct is also not possible.
Lastly the FPC team does not like the introduction of new keywords, which means adding a new keyword for this is also not an option.
Looking at the keywords available, I don't really see a good syntax option here.
Aside from that, if it's only for assignment it's quite limiting, as one of the main usecases for this is using it in function parameters if you don't want to introduce a new variable. If you just do a grep for IfThen in the Lazarus sources, you'll find that around half the use cases of the current IfThen function is not as an assignment.