Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why your first Rust FizzBuzz implementation may not work. Parent comment
It's already possible to have a function take "either a String or slice" generically:
def print_me<T>(me: T) where T: Str { println!("I am '{:s}'", me.as_slice()); }
There are no comments on this comment yet.
It's already possible to have a function take "either a String or slice" generically:
The overall ergonomics of this (or at least, the well-documented idioms) will certainly improve in the coming months.