News for hackers. Stuff that matters.
Re:Exploring Rust (from C#) by taspeotis on Wednesday March 23, 2016 @06:43AM (#11343304)
The annotated version of C# included in the blog post reminds me of Spec# http://research.microsoft.com/en-us/projects/specsharp/

Spec# has annotations and methods for object ownership. You can see an example of it in the "The Spec# Programming System: An Overview" slideshow (slide 39 onwards).

Also:

> C# has two families of data structures that dermine allocation behaviour: structs and classes. If a type is a struct then values of that type will be allocated on the stack:

Here's a primer on how the Microsoft CLR handles it, because it's more subtle than what's stated above. The end effect is that value types behave like values, reference types behave like references. Where they're stored is a function of where they need to be stored, not their type.

https://blogs.msdn.microsoft.com/ericlippert/2010/09/30/the-...

Re:Exploring Rust (from C#) by nblumhardt on Wednesday March 23, 2016 @07:17AM (#11343442)
Ah yes, my bad - the "value types go on the stack" simplification is a bit sloppy. It's a useful way to describe it to make the comparison - but definitely not for understanding C# in this case.
Re:Exploring Rust (from C#) by taspeotis on Wednesday March 23, 2016 @07:21AM (#11343460)
All good. Also, thanks for alt-composition and stateless.
Re:Exploring Rust (from C#) by forrestthewoods on Wednesday March 23, 2016 @08:11AM (#11343683)
That was a great blog post. Thanks for sharing.