5 ms·
Yes! This is what drives me the most crazy about rust: fn foo<<W<>W>G<>GGW>>>F<<D>F>>A>(bar: AJK<<<DUoSJK><<>S>>>){ ... } Okay, I'm probably being
by saosebastiao 12y ago
Yes! This is what drives me the most crazy about rust:
fn foo<<W<>W>G<>GGW>>>F<<D>F>>A>(bar: AJK<<<DUoSJK><<>S>>>){
...
}
Okay, I'm probably being a jackass, but I find Scala's use of [] for nested type annotations to be much easier to parse.
- andypants 12y agoI initially thought you were writing brainfuck
- ori_b 12y agoI'm biased, but I'm partial to Myrddin's syntax: const foo = {bar: @a, baz : asd(@a,foo(@b, bar(@c,@d),int)) ... }
- lambda 12y agoI'm wondering if it would be more readable with actual angle brackets rather than less than and greater than signs. from_str::<Option<uint>> vs from_str::‹Opton‹uint›› Hmm. Those are a little lightweight, are actually angle quotes, not angle brackets. Actual angle brackets aren't available on my keyboard, but would look like: from_str::⟨Option⟨uint⟩⟩ Jeez, why does Unicode have so many different variations on angle brackets? The above are "mathematical left/right angle bracket", but there's also: from_str::〈Option〈uint〉〉 Which uses "left/right-pointing angle bracket" and: from_str::〈Option〈uint〉〉 Which uses "left/right angle bracket" At least in the font I'm typing this in, the "left/right-pointing angle brackets" look the best to me. It would be really nice if now that Unicode is ubiquitous, we could standardize on keyboard layouts that get you access to more punctuation like this, so that people didn't have to keep fighting over a fairly limited amount of punctuation to use as technical notation in programming languages.
- steveklabnik 12y agoThere are some proposals to make that syntax go away. ::<> is certainly something we're not happy about.
- mercurial 12y agoWell, you'd make type synonyms in this case.