Ruby > Python so far…
So, I found out I need to learn Python in some capacity for my new job. I’m currently teaching myself, and that’s going well, except for one small problem – there’s no ternary operator. I mean, you can cheat and use an array:
[<false code>,<true code>][<conditional expression>]
But how does that start looking if you are nesting them? Completely unreadable. This is a much better idea:
<conditional expression> ? <true code> : <false code>
Would it be so bad to include in the language? I think not.


Comments are closed