Replies: 3 comments 15 replies
|
by vmcrash at reddit You already trigger the inference using val or var (instead of a type), so the := is redundant. I'd use it for something else. What do you vote? |
|
by vmcrash at reddit I'd also would get rid of elseif, because it only saves one keystroke for the space, but makes the language more complex. What do you vote? |
|
We may want to add an alias, or change the name entirely, for the dictionary methods 'exist' and 'alive'. The names aren't terrible so this isn't urgent by any means, but it's pretty unidiomatic. 'exist' checks if a given key has a value: ` dictionary.exist("foo") // evaluates to true ` dictionary.alive("bar") // evaluates to true It's not very idiomatic, especially 'alive'. I propose we change them to 'value_for' and 'key_for' respectively: ` dictionary.value_for("foo") // evaluates to true ` dictionary.key_for("bar") // evaluates to true Also, both of these methods return a boolean value. I could see how it would be useful to receive the actual match: if you use #value_for, you would see the actual value attached to the key ("bar"). However, it's still nice having a simple boolean check because if you can verify a value corresponds to the key, then you just lookup the value in the dictionary manually. Anyways, these changes can be an alias or a full replacement, but an alias would be preferred. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Create sub issues for syntax changes, that will be decided if accpeted or not with comments.
Write "ACCEPT" (thumbs up) if you want the change, "DECLINE" (thumbs down) if you dont want it. Right now, it needs 3 positives/negatives votes for being applied, with a minimum difference of two.
All reactions