-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Erlang bit syntax #5346
Comments
I feel as though this should probably be a syntax extension. |
One of the strengths of the Erlang bit syntax is that they can be used for pattern matching to implement a parser. Would this work with a syntax extension? |
This is still unimplemented. |
We have binary literals, and I agree that this should be a syntax extension. We also have loadable syntax extensions now, and I'm not sure that this should be included in the standard library by default, so closing. |
@alexcrichton given the other crates in rust.git, this doesn't seem out of place to me. Should we move this to an RFC ticket? |
One was actually created recently as well! |
Okay, thanks. |
…nsch Deprecate REPLACE_CONSTS lint Closes rust-lang#5346 changelog: Deprecate `replace_consts` lint
Here's a first pass of a language extension I wrote that allows you to pattern match binaries/bitstrings modeled after Erlang's byte matching functionality: https://crates.io/crates/match_bytes |
For a systems language it would be nice to imitate Erlang's bit syntax used to construct and pattern match binaries/bitstrings.
http://www.erlang.org/doc/programming_examples/bit_syntax.html
http://www.erlang.org/doc/reference_manual/expressions.html#id78511
http://www.erlang.org/doc/reference_manual/expressions.html#id79906
http://www.erlang.org/doc/reference_manual/data_types.html#id65994
The text was updated successfully, but these errors were encountered: