CartoDB / mobile-sdk

CARTO Mobile SDK core project
https://carto.com/docs/carto-engine/mobile-sdk/
BSD 3-Clause "New" or "Revised" License
186 stars 68 forks source link

[cartocsss] operator || not working #348

Closed farfromrefug closed 4 years ago

farfromrefug commented 4 years ago

It is said in the doc that the operator || is working However if i try to do that

@maki_icon: [nuti::maki-[subclass]] || [nuti::maki-[class]] || [nuti::maki-[layer]];

it does not seem to work. Would be very practical as easier to read than using ?:

mtehver commented 4 years ago

The || operator is designed to return boolean, as in C/C++. I know there are languages that support something like this (Python, for example). But most C-based languages do not. A better proposal would be be to add something like ?? operator in C# in addition to ||. Currently closing this and marking 'wont fix'.

farfromrefug commented 4 years ago

oh ok! got it ;)