Holy shit, are you reading my mind?
To be honest I was thinking about 4 mandatory spaces (no tab, no different amount of spaces, possibly no more than one way to express a computation).
But I'm also thinking of no `if` only match/switch.
@Shamar If I make something, for sure I'd go with the spaces mandatory with given size at the language level and no tabs too.
In a language with patterns and matching an "if" is useless since a "case" always is more powerful and subsumes it. So having an "if" is really not needed at all.
to be fair I can think of cases where sequences of `if/else if` cannot be easily subsumed by a `match/case` statement, not even if you evaluate the case selection expressions (as PHP did, as far as I can remember).
I mean something like
switch(true){
case isMonday(): print "Monday ";
case isSunday(): print "Sunday";
case isJune(): print "June ";
default: print "hi! ";
}
would print "Monday June ", but would not (easily) subsume "if/elif" (as far as I can think right now).
They are mutually exclusive in C (and most other languages, afaik) but I've seen at least one language using:
1) non-constants as case expression
2) non-exclusive branches
A recent example is React's Router dom's Switch (but I've seen this before)
I don't like this approach but I was looking for an `if/elif` idiomatic alternative in an if-less language.