News for hackers. Stuff that matters.
Re:The Pain of Real Linear Types in Rust by mafribe on Tuesday May 09, 2017 @12:45PM (#14301580)
Such questions are best answered after MLoC or GLoCs have been written.
Re:The Pain of Real Linear Types in Rust by kibwen on Tuesday May 09, 2017 @12:49PM (#14301627)
That may be true if your goal is to advance programming language research, but if your goal is to extend a language being used in industry then you don't have the luxury of spending that sort of design and implementation effort if you suspect that the extension will be a boondoggle (especially since backwards-compatibility promises mean that you'll be forced to support those features for the rest of time).
Re:The Pain of Real Linear Types in Rust by mafribe on Tuesday May 09, 2017 @12:55PM (#14301693)
I agree.

I wonder if Rust's compile-time meta-programming can be used to implement 'pluggable' linear-types for experiments, maybe along the lines of [1]. That might be a good compromise.

[1] S. Chang, A. Knauth, B. Greenman, Type Systems as Macros. http://www.ccs.neu.edu/home/stchang/pubs/ckg-popl2017.pdf

Re:The Pain of Real Linear Types in Rust by Veedrac on Tuesday May 09, 2017 @02:50PM (#14302830)
Ah, but you can fake linear types today! There are ergonomic issues, but it works and it's used in practice.

https://www.reddit.com/r/rust/comments/6a3ac4/the_pain_of_re...

Re:The Pain of Real Linear Types in Rust by kibwen on Tuesday May 09, 2017 @01:00PM (#14301756)
I can offer no proof but I'm Pretty Sure that one could hack together linear types using procedural macros, though I can't posit how nice they would be to use nor how well they would interact with the rest of the language and ecosystem.
Re:The Pain of Real Linear Types in Rust by mafribe on Tuesday May 09, 2017 @02:00PM (#14302411)
Wouldn't that be a good path: start with initial experiments based on types-by-macros, and see how well that works. Can't be worse that C++'s template meta-programming.
Re:The Pain of Real Linear Types in Rust by johncolanduoni on Tuesday May 09, 2017 @12:52PM (#14301660)
Also known as "the Scala problem" (and I say that as someone who writes a lot of Scala).