- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
Inspired by a question on Reddit (http://www.reddit.com/r/rust/comments/178t57/intimidation_factor_vs_target_audience/c83br4f). Basically all it needs to contain is a list of removed features, with a reason for the removal of each. In addition to being fascinating, it would be a good resource for other would-be language designers. Here's what I came up with off the top of my head (pasted from the Reddit thread):
- Typestate (because nobody used it)
- Structural records (in favor of nominal records (structs), but I'm not sure of the exact reason)
- Argument modes (frustrating to use, impossible to learn, horrifying to look at; replaced with borrowed pointers)
- Classes (because the day after they finished implementing them they realized you could get the same effect from combining impls and structs)
- Ternary operator (because ifis already an expression)
- Resources (in favor of drop {}blocks within struct definitions, which were then themselves removed in favor of theDroptrait)
- Explicit move, first via the <-operator and then via themovekeyword (now owned types always move unless you explicitly copy them (and even thecopykeyword will soon be gone in favor of a compiler-generated.copy()method)
- Long-style closure expressions (in favor of the shorter || {}syntax)
- Old-style operator overloading (in favor of the overloading traits in core::ops)
- comm-style primitives (replaced with- pipe-style primitives, which are way faster, more basic, and can be used to implement- comm-style if you really want it)
- Module-wide exportdeclarations (now you denote visibility on the item itself)
- Mandatory integer-literal and float-literal type suffixes (they were a pain to use, and are now inferred if you leave them off)
- do-whileloops (rarely used, trivial to emulate)
- fn foo() unsafe {(which was different from- unsafe fn() foo, and can be approximated by- fn foo() { unsafe {)
- Guaranteed tail recursion via the bekeyword (requires changing the calling convention, which is a performance cost that they just can't afford)
- The bindkeyword (rarely used, syntax was unintuitive, and not difficult to emulate via closures)
- notestatements (not actually sure why they were removed, I'm not sure if they were ever even implemented)
- (WIP) The statickeyword (any method definition without aselfargument is static)
- (WIP) The log,fail, andassertkeywords (these can all be done as macros).
- (WIP) The concepts of both constandpure(likely obviated by the new INHTWAMA work)
- (Possibly) field-level mutability (in favor of object-wide "inherited" mutability)
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.