[Cryptography] Languages, languages (was Re: Swift and cryptography)

Perry E. Metzger perry at piermont.com
Thu Jun 12 20:55:16 EDT 2014


On Thu, 12 Jun 2014 16:53:08 -0700 Tony Arcieri <bascule at gmail.com>
wrote:
> > It is also a safe language. Swift has (so far as I can tell) no
> > undefined behaviors
> 
> I'm having trouble finding any information on it besides this, but
> it seems when it comes to multithreaded programming, data races and
> other types of memory corruption that can result from concurrent
> modifications are still entirely possible:

That is indeed true.

> I'd contrast this with another language that emphasizes safety,
> Rust, which uses an advanced region typing system (a.k.a. "the
> borrow checker") to ensure concurrent programs are free of data
> races, even when using mutable state. This makes Rust safe in ways
> ("concurrency safe"?) that Swift is not.

I have certain doubts about how ready for prime time that is. My
understanding is that the associated checks are fairly complicated,
and regions systems are not yet a mainstream thing in general.

That said, yes, dealing with safety in concurrency is important, and
it isn't clear that Swift has any answers for that yet, and your point
is well taken.

Personally I'm partial to go's solution, which is to adopt the CSP
model and get rid of shared state entirely, but that's another long
story, and we're getting far afield of crypto.

-- 
Perry E. Metzger		perry at piermont.com


More information about the cryptography mailing list