tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
Tim Chevalier ([personal profile] tim) wrote2013-06-19 04:56 pm
Entry tags:

TMI: Open Source Bridge talk: given!

Here are the slides for my talk, "Rust: a Friendly Introduction". I'd love to clarify anything that needs it in comments on this post.
corvi: (Default)

[personal profile] corvi 2013-06-20 02:54 am (UTC)(link)
How'd it go?
juli: hill, guardrail, bright blue sky (Default)

[personal profile] juli 2013-06-20 06:22 am (UTC)(link)
Great talk, and I found it really interesting and enjoyable to read! I generally wonder about the omission of modern compilers from talking about C's features. Yes, as a language the typing is all crap, but in practice implementations can be more aggressive about type checking, etc. And C++ in particular is not as content with treating enums as just plain integers — using enums as integers in C or C++ can lead to very awful pain and should usually be avoided, IM!HO.

For instance:
enum Foo { Cock, Dong };
int f(Foo x) {
	switch (x) {
	case 30:
		return -1;
	}
	return 40;
}

Which, with the default Clang setup on Mac OS X, no additional warning flags, yields:
x.cc:4:7: warning: case value not in enumerated type 'Foo' [-Wswitch]
        case 30:
             ^
x.cc:3:10: warning: enumeration values 'Cock' and 'Dong' not handled in switch [-Wswitch]
        switch (x) {
                ^
2 warnings generated.

So, yes, the language isn't offering guarantees there as such, and some of them are there if you want them (and I can't imagine not turning on the vast majority of warnings and treating them as errors.)
etb: (bus is coming)

[personal profile] etb 2013-06-21 06:24 am (UTC)(link)
p. 6: It's easy (at least, used to be) to see the connection between Java source and JVM bytecode. But you were probably talking about machine code.

pp. 8, 45: If you have the whole program and monomorphize, like MLton does, you don't have to box everything.