One question mark broke Cherno for like 10 minutes.
Those new non-nullable features are actually a big thing and most modern programming languages are moving towards approaches like this. For example Kotlin, Dart, Typescript. They all work like this, where everything is considered non-nullable until you specifically say its nullable. This is really helpful, because most of the cases you don't need things to be nullable and in the cases you do need them to be nullable, the compiler helps you checking if its null or not before doing operations on it. Also when you do stuff like if (variable != null) {, inside the block after the if, the variable gets promoted and the compiler automatically considers it to be non-nullable, which is just amazing
Every time a video like this is uploaded I feel dangerously stupid.
45:00 the moment cherno realised it's his code. Thanks Sam 🤣 for the code. insert Spiderman meme
Im one of the maintainers of OpenTK, and it is really interesting to watch through someone critiquing a project made using a library i have helped so much. I have spent way more time developing opentk itself than making products with it. So very interesting watch.
Rendering architecture was probably the biggest hurdle after figuring out OpenGL so would definitely be a helpful video for a lot of people!
Since you asked about C#, I would be interested to see you talk about your C# scripting integration in Hazel
I wasn’t sure about the nullability improvement in C#8 but after using it for a few years I’ve became a fan. It forces you to think a lot more about the code you’re writing and you can change the compiler settings to force a compile failure when there is a potential null reference exception. It came after some statistics were released that said something like 80% of all exceptions in C# are null reference exceptions. But if you don’t like it, you can always turn it off and choose not to use it.
C#'s new nullable (which needs to be explicitly enabled) is really nice. Especially for large codebases, you no longer need to check for null in every method that receives a class as argument unless its an Optional (? postfix) type.
I really enjoyed seeing a dive into a C# renderer and the critiques of the architecture. It would be great if you made a video about basic openGL rendering architecture like you mentioned.
I was a part of the discussion where Sam helped garlfin with the bloom and he did make it clear that this was your code but slightly modified for better names for garlfin to understand. He didn't mean to steal your code just saying :D
Being mainly a C# programmer myself I'd love to see more C# videos but I would like to see a bunch of other languages too. Also I think the diagram thing you were thinking of was a dependency graph? Its a feature only available I think in the professional or enterprise versions.
As mentioned in previous comments, in this case in the code the nullable reference type didn't really mean much and really didn't need to be there. But the feature is a great feature to have turned on in projects. There is actually stories of major libraries turning it on and actually finding bugs that they never knew were there because the compiler could actually tell you that "hey this could be null." Most modern languages are implementing things like this. NULL is something most languages are really trying to force out of the language now. I recently just wrote a library for something at work with the feature turned on and it really helped me out a lot. I am learning Swift and it's similar, and I love it. I've yet to actually run into a null pointer exception because the compiler will really force you to think about "are you sure you want to do this...I could be null."
The null-able opt-in is a tad useless in your case but if you declare something as not null then it forces you to set in the constructor. Which is really handy in c# especially when dealing with DI..
I particularly prefer the C++ reviews, but once in a while is good to have other languages. Awesome review!
This is probably the most informative code channel ive come across on youtube. i appreciate that.
Haha, well done on the sponsor ad. You just snuck that right in there during the clone. Smooth! 😋
Nullable reference type is a compiler service rather than a type. You can call the service by post-fixing '?" to the variable you want the compiler to watch your code mistake. from time to time, for a short time, you can turn it off by post-fixing '!'. That is different from nullable value type, which wraps a value type and expose the underlying value thru "Value" properperty. Nullable reference type doesn't cost you at all because it is a compiler service. However, it gives you amazing relief and safety to your code. It is the very cure for the all the madness from the implicit null initialization. It is one of top three adorable things in C#, along with ref( and out) and delegate.
I started watching your channel in learning computer graphics and a bit of interest of C++ programming but I'm mainly geared towards C#. Because of it, I'd love to see more C# code reviews as well!
@TheCherno