====== Void Safety ====== * [[http://docs.eiffel.com/book/method/void-safe-programming-eiffel|Void Safety Documentation]] * {{ :eiffel:meyer-voidsafety.pdf |Ending Null Pointer Crashes}}; Void safety relies on type declarations and static analysis. * {{ :eiffel:faq:avoid-a-void.pdf |Avoid a Void}} [[https://svn.eecs.yorku.ca/repos/sel-open/misc/tutorial/Void-Safety/Void%20Safety.html|code snippet]] (login with ''anonymous'' and no password). ===== Slides and Code===== svn export https://svn.eecs.yorku.ca/repos/sel-open/misc/tutorial/Void-Safety/node [[https://youtu.be/nq3-ZnaLOJs|Slide Video]] {{ :eiffel:faq:faq:void-safety.pdf |pdf}} ===== Formal generic type declarations ===== *FOO [G] = FOO [G -> detachable separate ANY] - actual generic can be detachable and can be separate. *FOO [G -> detachable ANY] - actual generic can be detachable, but it is never separate. *FOO [G -> ANY] = FOO [G -> attached ANY] - actual generic is always attached and is never separate. *FOO [G -> separate ANY] = FOO [G -> attached separate ANY] - actual generic is always attached and can be separate. It is also possible to have indirect constraints, e.g. BAR [G -> H, H -> ANY] means that actual generic parameter corresponding to G should be attached and non-separate.