3 ms·
It seems there's a conflict between the logical flow of prefixes going right to left and postfixes going left to right. I wonder if there's any value (for other
by numakerg 7y ago
It seems there's a conflict between the logical flow of prefixes going right to left and postfixes going left to right. I wonder if there's any value (for other future languages) in having syntax to swap post and prefix for convenience
instead of (await doSomething()).somethingElse()
doSomething()@await.somethingElse()
- a1369209993 7y agoThat seems to be what this proposal is already working toward, eg with the discussion of also supporting .match. keyword EXPR MAYBEBODY <=> EXPR.keyword MAYBEBODY
- steveklabnik 7y agoFrom the post: > “Dot keyword:” In the previous post, a sketch was made of an idea in which certain keywords could be postfixed or infixed using the dot operator. This idea is only a sketch, and is not implied or guaranteed by the decision we’ve made here.
- a1369209993 7y agoAh, pity; I originally read it as "We aren't sure which - if any - keywords we want to do this to.".