Email or username:

Password:

Forgot your password?
Top-level
Joshua Barretto

I implemented this function in my own language, Tao (it calls out to an intrinsic internally which causes the compiler to choose one of the two functions during monomorphisation). It works great. I'm currently using it to specialise the pretty-printing implementation for `Str` (which is just a type alias of `[Char]`) so that it doesn't print like a list (i.e: with brackets and commas between elements): github.com/zesterer/tao/blob/b

(I currently call it 'dispatch', although I'm going to change this)

1 comment
Joshua Barretto

Having this in Rust would be so incredibly useful for so many things. Right now `std` bends over backwards with specialised helper traits to do things like not reallocating vectors where it doesn't need to, but I think almost all of these cases could be replaced with a simple call to such a function.

Go Up