<div dir="ltr"><div>Hi everyone,</div><div><br></div><div>In the <a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/">introduction to Swift</a>, it is presented as an &quot;industrial-quality systems programming language&quot;.</div><div>According to <a href="https://en.wikipedia.org/wiki/System_programming_language">Wikipedia</a>, this means that I could expect to be able to write device drivers or operating systems in Swift.</div><div><br></div><div>However it seems like this claim is only partially true, since several important low-level features seem to be completely missing:</div><div><br></div><div>- Is it possible to generate <a href="http://llvm.org/docs/LangRef.html#volatile-memory-accesses">volatile memory accesses</a> in Swift? Writing device drivers is virtually impossible without a way to guarantee certain memory operations are actually made (and not optimized-out). </div><div><br></div><div>- Is it possible to embed raw binary data in Swift? For example, an equivalent of the following C code &quot;const int8_t foo[6] = {0x00,0x11,0x22,0x33,0x44,0x55};&quot;? The simple Swift equivalent, &quot;let foo: [Int8] = [0x0,0x1,0x2,0x3,0x4,0x6];&quot; is obviously wildly different. Being able to embed raw binary data is very important in a low-level environment: for example, you may need to feed specific data to a device for an initialization sequence at a point where you don&#39;t have a filesystem available yet.</div><div><br></div><div>There might be other aspects that I&#39;m overlooking right now, but I think that&#39;s enough to start a discussion: is Swift really meant to be a systems programming language?</div><div><br></div><div>Thanks,</div><div><br></div><div> - Romain</div></div>