cloudhead/less.js — comment on commit 624c297e7be093bd2234c4fac8d2bfa085cfadae
File:  line 0
By matthewdl:

Hmm.... Well, maybe it doesn't directly translate. Because the colon signaling an equals is, you're right, how CSS does it, except it would probably get even more stupid with greater than / less than. It's actually more like:

``` .mixin(@a: 4) when (min-@a: 4) { ... } ```

...which is flat-out bonkers. CSS doesn't provide <= or >= (which is already annoying), which a mixin guard should cover.

I do like the "when" keyword and the paranthetical wrapper, as I find some of the C-style or JavaScript style conditionals a little too shorthandy. I spent a lot of years in Visual Basic, and I still like when things are not ambiguous.

What do you think of simply:

```.mixin(@a: 4) when (@a = 3) { ... } ```

I feel like that line is VERY intuitive to new users, as, like CSS, it reads as english. For devs, you could provide the ? as a shorthand for when, and the parenthetical makes it clear exactly which part is the condition. It also opens up the door for stuff down the road like:

```.mixin(@a: 4, @b: 3) when (@a = 3) or (@b = 3) { ... } ```

Can we assume that a mixin with no guards (conditions) is an else? Or does it always evaluate to true? In other words, say I have this (with whichever syntax):

```css
.mixin(@a: 4, @b: 3) when (@a = 4) { ... }
.mixin(@a: 4, @b: 3) when (@b >= 3) { ... }
.mixin(@a: 4, @b: 3) { ... }
```

What exactly would happen? I think this is the problem with not having if / (else if) / else, but perhaps if I want if / else, then I need to supply the appropriate conditions?

As a programmer, my expectation would be that all three would match true and output something, but of course I'd like to have scenarios where they are exclusive.