News for hackers. Stuff that matters.
Re:Redis re-implemented in Rust by pornel on Friday June 19, 2015 @09:40AM (#9744604)
In Rust it's unfortunately typical to give one-letter names to generic types. A verbose version could be:

   fn search_entry_hashed<'lifetime, KeyType: Eq, ValueType>
      (table: &'lifetime mut RawTable<KeyType, ValueType>, hash: SafeHash, key: KeyType)
      -> Entry<'lifetime, KeyType, ValueType>
Re:Redis re-implemented in Rust by Jweb_Guru on Friday June 19, 2015 @11:14AM (#9745333)
"'lifetime" gives no useful semantic information there. All 'somethings are lifetimes; it would be like naming a type parameter "Type," or a variable "variable." If you don't have a specific shard context that would give the name meaning, `'a` is as good as any. I do agree that something like Key or Value would probably be better than K or V.
Re:Redis re-implemented in Rust by nemaar on Friday June 19, 2015 @12:45PM (#9746024)
Yes, in general, it is a good idea to give more descriptive names but in the context of a hashtable, K and V are good enough. I seriously doubt that there is anyone reading the source code of a hashtable and cannot figure out in milliseconds what K and V mean (how fast is the human brain?:).