# \[pre-RFC\] linear types, take 2

**URL:** <https://internals.rust-lang.org/t/pre-rfc-linear-types-take-2/1323>\
**Category:** ideas (deprecated)\
**Created:** [January 14, 2015, 7:52pm UTC](https://internals.rust-lang.org/t/pre-rfc-linear-types-take-2/1323 "2015-01-14T19:52:14Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![aidancully](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/aidancully/32/5532_2.png) [@aidancully](https://internals.rust-lang.org/u/aidancully)\
**Post date:** [January 21, 2015, 12:59pm UTC](https://internals.rust-lang.org/t/pre-rfc-linear-types-take-2/1323/8 "2015-01-21T12:59:25Z")

</div>

Thank you for that... I agree, a `Linear` marker as you describe is better than what I have, and brings my proposal a lot closer to @eddyb's ([source](http://internals.rust-lang.org/t/pre-rfc-linear-type-modifier/1225/10)), which is probably a good thing. The major difference between our two approaches is that I allow a linear type to be disposed by moving its data out, where he explicitly destroys a linear type using the `mem::forget` intrinsic.

> [@tomjakubowski](#):
>
> By the way, the syntax fn my\_drop\<T: ?Linear\> implies that Linear would be a default bound on the type variable T.

I interpreted `?` as meaning the trait _may or may not_ apply to the type, so that a `T: ?Linear` must be compilable with both linear and non-linear arguments, and added the syntax `!Linear` to enforce that the type argument not be linear (and `T: Linear` to enforce that the type be linear), where the default would be that the linearity of the type would be inferred. I _think_ this is the most natural way to read the code. It may be a change from how the syntax is interpreted today, but I don't think it's backwards-incompatible... Default of `Sized` trait bound is "on", of all other currently existing traits is "off", and of the proposed `Linear` would be "inferred".

@kennytm, that probably is an easier fit in the current language, but I find it more awkward than the proposal, since you would have to write and read double-negatives pretty frequently...

---

_[View the full topic](https://internals.rust-lang.org/t/pre-rfc-linear-types-take-2/1323)._
