The <T> makes me think of generic classes/method (but maybe it means something else in other languages). But yeah, looks like C# 8.0 is indeed getting better ways to control whether things can be null or not, which is great!
Conversation
It is a generic type, it means it’s a value of type T, or possibly null.
1
Yeah, in Rust for example you have:
enum Option<T> {
Some(T),
None,
}
So it can either be something or nothing. No value can ever be null in Rust, so it effectively gives you opt-in nullability. Likewise you have:
enum Result<T, E> {
Ok(T),
Err(E),
}
1
Yeah, I got into Rust for gamedev because I was avoiding C++ - never got around to making a game though 😬. There's a nice bunch of peeps who like to mess around with game stuff in Rust though! Also audiophiles like :)
1
2
I saw this stuff recently too:
- youtube.com/watch?v=Yom9E-
- synthesize.rs/nov-2018-talk/
Hope that helps!
2


