diff options
-rw-r--r-- | rfc.md | 31 |
1 files changed, 28 insertions, 3 deletions
@@ -1,12 +1,37 @@ | |||
1 | - Feature Name: (fill me in with a unique ident, my_awesome_feature) | 1 | - Feature Name: libsyntax2 |
2 | - Start Date: (fill me in with today's date, YYYY-MM-DD) | 2 | - Start Date: 2017-12-30 |
3 | - RFC PR: (leave this empty) | 3 | - RFC PR: (leave this empty) |
4 | - Rust Issue: (leave this empty) | 4 | - Rust Issue: (leave this empty) |
5 | 5 | ||
6 | |||
7 | >I think the lack of reusability comes in object-oriented languages, | ||
8 | >not functional languages. Because the problem with object-oriented | ||
9 | >languages is they’ve got all this implicit environment that they | ||
10 | >carry around with them. You wanted a banana but what you got was a | ||
11 | >gorilla holding the banana and the entire jungle. | ||
12 | > | ||
13 | >If you have referentially transparent code, if you have pure | ||
14 | >functions — all the data comes in its input arguments and everything | ||
15 | >goes out and leave no state behind — it’s incredibly reusable. | ||
16 | > | ||
17 | > **Joe Armstrong** | ||
18 | |||
6 | # Summary | 19 | # Summary |
7 | [summary]: #summary | 20 | [summary]: #summary |
8 | 21 | ||
9 | One para explanation of the feature. | 22 | The long-term plan is to rewrite libsyntax parser and syntax tree data |
23 | structure to create a software component independent of the rest of | ||
24 | rustc compiler and suitable for the needs of IDEs and code | ||
25 | editors. This RFCs is the first step of this plan, whose goal is to | ||
26 | find out if this is possible at least in theory. If it is possible, | ||
27 | the next steps would be a prototype implementation as a crates.io | ||
28 | crate and a separate RFC for integrating the prototype with rustc, | ||
29 | other tools, and eventual libsyntax removal. | ||
30 | |||
31 | Note that this RFC does not propose to stabilize any API for working | ||
32 | with rust syntax: the semver version of the hypothetical library would | ||
33 | be `0.1.0`. | ||
34 | |||
10 | 35 | ||
11 | # Motivation | 36 | # Motivation |
12 | [motivation]: #motivation | 37 | [motivation]: #motivation |