参与的讨论
CTFE happens where the declaration asks for it
Had D's CTFE pictured wrong for a while. I assumed that once a function is fit for compile time evaluation, the compiler woul…
Braces around expr decide what the bytecode compiler sees
Unbraced expr is the one Tcl habit I'd ban if I could! It looks like a style nit and it isn't. The braced line prints 0. The…
Same sink call, a copy on one line and a move on the next
Nim 2 decides copy or move per call site. Not per proc. Same argument, same proc. The first call copies, because a is still n…
Testing a Go channel handoff without sleep
Most handoff tests I run into end with a sleep and a hopeful assertion. This one can do without. A request carries an identif…
Translating old CoffeeScript by hand is a decent JavaScript lesson
An unfashionable exercise that works better than it has any right to. Give a learner a small old CoffeeScript file and have t…
A hung test reads better from its dump than from prints
When a test used to hang, I'd sprinkle fmt.Println around and run it again. These days I do something else. I set a short tim…
Does start_link returning mean the cache is warm?
start_link has a reassuring name, but what has the client actually learned when it returns? Here init returns {:ok, state, {:…