not really? they work almost like comments when it comes to parsing, except you tokenize their innards (unlike comments)
-
-
Of course they’re easy to *tokenize*, but they’re not easy to *expand*. Any tool that does not expand macros is broken.
3 replies 1 retweet 3 likes -
syntax highlighting parsers don't need to handle this :) nor does rustfmt but yes, I agree with your general point wrt proc macros
2 replies 0 retweets 0 likes -
Syntax highlighting doesn’t even need to parse the language, only lex it.
2 replies 0 retweets 0 likes -
semantic highlighting needs to parse.
1 reply 0 retweets 0 likes -
Of all the difficulties involved in doing partial parses of Rust, with error recovery, etc, unbounded lookahead is not even in the top 100.
1 reply 0 retweets 0 likes -
this isn't about some huge one-time insurmountable cost it's about drawing a line in the sand so the grammar doesn't slowly slide into something ugly
1 reply 0 retweets 1 like -
And I’m saying this is a pointless line to draw. Draw the line at, like, the lexer hack. Not this. If we had persisted with the “line in the sand” reasoning in Rust’s early days, we’d have been writing “match foo { None. => {…} }” because someone might name a variable None.
1 reply 0 retweets 1 like -
Yes, that was a mistake.
1 reply 0 retweets 5 likes -
Replying to @graydon_pub @pcwalton and
It was compounded by dozens of other "just a little more" mistakes and we are now in 2019 and nobody even knows whether it'll be possible to formalize the language in a grammar at all.
2 replies 0 retweets 5 likes
You think that removing the dot from None was a mistake?
-
-
I don't remember if it was a leading dot or some other disambiguator at the time it was made ambiguous (we went through several), but yes.
1 reply 0 retweets 1 like -
Completely disagree. If the dot had stayed in, the language would have been much harder to learn. Hard to learn == a potential death sentence for Rust. With respect, I think we fundamentally value different things. I value pragmatism.
2 replies 0 retweets 3 likes - 8 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.