2 ms·
I’ll give a shot at answering your rant with another one: I’ve never figured out those question marks. And in your example, what the hell even happens if condi
by wodenokoto 5y ago
I’ll give a shot at answering your rant with another one:
I’ve never figured out those question marks. And in your example, what the hell even happens if condition is true or false? At least the lisp version has a function call that includes the word set, so you can kinda guess that the x variable is set.
The if-expression reads very close to English, so you don’t need to look it up in the manual to read it.
I wouldn’t even know what to query to look up `code ? Code : code` in a manual / google. `setq` is also easy to look up.
The question mark colon loses on all counts in my book. I hate it.
- rjsw 5y agoThe C example doesn't match the others as the assignment is missing. It should be: x = condition() ? 4 : 5