HELLO! F# |> I ❤ 9 years of experience in .NET Organiser of Bristol F# meetup and DDD South West You can find me at @stuartblang & http://stuartlang.uk
Stack vs Heap What? Lifetime When disposed? Time to dispose Stack Local values Local references (just the ref part) Stack frame Deterministic Constant (near instant) Heap Reference object instances Unrestricted GC non-deterministic It depends (non-trivial)
In Parameters - cont. ▸ Essentially readonly ref ▸ Where you want to want to pass by-ref for performance, with the safety and behaviour or by-value ▸ Watch out for copying with invoking methods on non-readonly structs
Good Reads ▸ Adam Sitnik - Span ▸ Marc Gravell - Spans and ref Parts 1 & 2 ▸ Span spec ▸ Vladimir Sadov ▸ All About Span: Exploring a New .NET Mainstay - Stephen Toub ▸ Maarten Balliauw