Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
aethertap
on Dec 22, 2014
|
parent
|
context
|
favorite
| on:
Rust, an Anti-Sloppy Programming Language
Okay, this is a revelation. I hadn't seen refutable lets, and this seems great!
masklinn
on Dec 22, 2014
|
next
[–]
Refutable lets also work in `while` (`while let pattern = expression { … }`), which is pretty great.
aethertap
on Dec 23, 2014
|
parent
|
next
[–]
I just rewrote one of my parser functions using that, and it literally eliminated 90% of the code and improved error reporting at the same time. Very cool, thanks for the tip.
geofft
on Dec 23, 2014
|
prev
[–]
Take a look at this PR:
https://github.com/rust-lang/rust/pull/19405/files
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: