Bringing C# nullability into existing code - dammit is not the answer! - Maarten Balliauw

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024
  • This talk was recorded at NDC Porto in Porto, Portugal. #ndcporto #ndcconferences #csharp #developer #softwaredeveloper
    Attend the next NDC conference near you:
    ndcconferences...
    ndcporto.com/
    Subscribe to our TH-cam channel and learn every day:
    /‪@NDC‬
    Follow our Social Media!
    / ndcconferences
    / ndc_conferences
    / ndc_conferences
    The C# nullability features help you minimize the likelihood of encountering that dreaded System.NullReferenceException. Nullability syntax and annotations give hints as to whether a type can be nullable or not, and better static analysis is available to catch unhandled nulls while developing your code. What's not to like?
    Introducing explicit nullability into an existing code bases is a Herculean effort. There's much more to it than just sprinkling some `?` and `!` throughout your code. It's not a silver bullet either: you'll still need to check non-nullable variables for null.
    In this talk, we'll see some techniques and approaches that worked for me, and explore how you can migrate an existing code base to use the full potential of C# nullability.

ความคิดเห็น • 3

  • @trejkaz
    @trejkaz 6 หลายเดือนก่อน +1

    I think the example at 33:14 would have been even stronger using `_lastName` as an example of `Nullable` instead of `_middleName`. Everyone knows middle names are optional, but knowing that first names and last names are also optional makes you a superstar developer

  • @justsignmeup911
    @justsignmeup911 6 หลายเดือนก่อน +4

    turning a billion dollar mistake into a two billion dollar mistake

  • @rngesus8057
    @rngesus8057 6 หลายเดือนก่อน

    26:50 yeah point of the attr is to say "dont worry ive thought about this"