MRC-CSO-SPHSU / LoneParentsModel.jl

An initial implementation of an ABM for social and child care
0 stars 5 forks source link

styleguide: only use ?: to select values #47

Closed mhinsch closed 2 years ago

mhinsch commented 2 years ago

I think the use of ?: as an if-replacement is getting out of hand. It's really easy to skip over these lines and if you are - like me - used to the C/C++ use of ?: it automatically registers as non-modifying. There are some cases where it's nicer to use (modifying) ?: than if, but especially if one of the branches is empty I would really prefer it if we could stick with the boring option.

AtiyahElsheikh commented 2 years ago

So I usually make use of ? may be there are more potentials in current code and I am fine with that.

AtiyahElsheikh commented 2 years ago

I misunderstood you I am fine with if rather than ?

AtiyahElsheikh commented 2 years ago

Will take little time before all ? are transformed to if

mhinsch commented 2 years ago

No worries, this is obviously low priority. Just maybe something to keep in mind.