Follow

re: C++ & Rust 

@amiloradovsky@functional.cafe Well I guess we mean different things by type system then. I never said it borrow checker came from nowhere, I simply said it's not universal like a type system that C++ has. I wouldn't want lifetimes in c++2x, instead - new primitives that will allow a library implementation. As far as I know the missing link is a compile time stateful counter. Then later maybe some syntax sugar, for patterns that prove to be most useful.

I looked up linear type systems and the first "not-quite" example is c++'s unique_ptr, a standard library class/type. There should just be another quite the example "owner_ptr" type, that would also optionally cover all the other variations as well ("Ordered", "Affine", "Relevant"), with what in the context of the language are called type parameters.

Whatever language it is in a few decades it will have unwanted stale features. C++ is still alive and kicking because almost all of it's features were and are optional.

@newt

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.