May. 17th, 2012

tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (work)

Yesterday

Finishing up porting resource tests to use destructors. I got behavior I couldn't understand with one test, resource-cycle, so I'll ignore that for now and move on to resource-generic.

Aside from having to prefix every field reference with self., the porting itself is pretty straightforward. (As I'd expect, since a class with a destructor is a pretty straightforward generalization of a resource.)

Random thought: I love seeing an internal compiler error -- it's much better than a program segfaulting -- because I know it's absolutely a bug no matter what, and that I can get a backtrace that will probably be helpful. In this case it was a non-exhaustive match in type_use::type_uses_for. Yet another reason why I despise alt check (Rust's non-exhaustive pattern-matching construct, like an incomplete case in Haskell) -- when I'm extending the compiler with new variants for a data type, I get less help from the compiler than I should otherwise.

Cut for length )

Times when I have to remember extra hard to redact my debug statements before checking in code: when I'm feeling inarticulate and just use #debug("meow") to denote which alt pattern matched.

Profile

tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
Tim Chevalier

November 2021

S M T W T F S
 123456
78 910111213
14151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags