<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi Robert,</div><div class=""><br class=""></div>To my knowledge, nothing like this has been seriously proposed. You may want to mail the <a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a> list and start a discussion there.<div class=""><br class=""></div><div class="">I think a good way to approach your objectives might be for Swift to adopt some sort of taint analysis-like checking, much like what Rust does with its 'unsafe' keyword. The idea being that certain things, like a function which invokes a C function or unsafe direct access to memory, would be marked as 'unsafe', and anything using an 'unsafe' thing would itself become 'unsafe'. A library that is 'safe' at the top level would be guaranteed not to segfault, call C code, or do many other things that could cause issues.</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Austin</div><div class=""><br class=""></div><div class=""><a href="https://doc.rust-lang.org/book/unsafe.html" class="">https://doc.rust-lang.org/book/unsafe.html</a></div><div class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 25, 2016, at 8:54 PM, Robert Nikander via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi,<br class=""><br class="">I’m thinking about creating an OS X app with dynamically loaded plugins. I hear that it’s safest to load plugins in a separate process, so they can’t crash the host program. I haven’t tried this yet, so I’m not sure exactly how it will work. But it got me wondering… has there been any discussion about doing something in Swift like Java’s “verified” code, where you can load a 3rd party plugin and trust that it’s not going to segfault or call some C-library? In other words, no unsafe actions. I’ve seen references to “bitcode” but I don’t know how close that is to JVM bytecode. &nbsp;And maybe this idea is incompatible in some way with the guiding principles of Swift.<br class=""><br class="">Rob<br class="">_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></div></div></blockquote></div><br class=""></div></div></body></html>