funq: syntax that doesn't scare off C++ developers

Marco Martin notmart at gmail.com
Fri Jul 25 09:36:41 UTC 2014


On Friday 25 July 2014, Ivan Čukić wrote:

> While there is no technical need for ==, it doesn't mean that the resulting
> code is readable. It is needed for usability - if you are reading a long
> function and encounter something = 2, you need to go upwards and check
> whether something was already defined or not to see whether it is a new
> alias or a comparison.
> 

unless assignment becomes this wacky thing, equivalent to comparison for all 
intents and purposes:

undefined = defined -> returns true, has a sideeffect: the variable that was 
undefined gets assigned the value of defined
defined = defined -> returns true iff the two defined variables/values have 
the same value, no sideeffect
defined = undefined -> returns false, no sideeffect

not sure is a good thing tough ;)

-- 
Marco Martin


More information about the Funq-devel mailing list