New function colour: unsafe

An arbitrary "safe" swift function can also do that :sweat_smile:

func foo(count: Int) {
    if count != 0 {
        foo(count: count - 1)

I don't know if this is precedented or not: we may have one another more strict colour (or a language mode / compiler setting / lint rule) under which you won't be able calling C/C++/Obj-C or any other unsafe {...} block.


    utmostSafe func foo() {
        unsafe { unsafeCall() } // error
    /*safe*/ func foo() {
        unsafe { unsafeCall() } // ok
    unsafe func foo() {
        unsafeCall() // non brainer

With this mode people would be totally protected from unsafety by paying the price of not being able calling C/C++/Obj-C, etc.

As I understand it we are talking here about memory safety only, and yes there are other types of safety ("crash safety", "trap safety", "hang safety", "realtime safety", "bug safety" to name a few).