Skip to content

Instantly share code, notes, and snippets.

View alinpopa's full-sized avatar

Alin Popa alinpopa

View GitHub Profile
package bitset
import "fmt"
const (
chunkSize uint = 8
allSet uint64 = 1<<8 - 1
allReset uint64 = 0
)
@retronym
retronym / abstract-override.scala
Created October 7, 2010 21:53
I couldn't remember if stackable traits intercept calls internally in the super class. They do...
scala> trait A { def foo = 1; def bar = foo }
defined trait A
scala> trait B extends A { abstract override def foo = super.foo + 1 }
defined trait B
scala> new A with B {}
res2: java.lang.Object with A with B = $anon$1@540fe861
scala> .bar