Null safety feedback


(Aleksandr Kuzmenko) #1

We would like to get your feedback for the new experimental null safety feature.
What’s good, what’s bad, what’s surprising etc.

Please try it with the latest Haxe and post your feedback in this thread or start a new one with the “null-safety” tag.

I recommend using static extensions like these for nullable values. Tell us, which extensions you use and which are missing.

(David Bruce) #2


These static extensions look pretty great, but have you noticed these taking a hit to compilation time?

Thank you for all of your hard work! :slight_smile:

(Aleksandr Kuzmenko) #3

No, I haven’t.
What times does compiler show you with --times argument?

(David Bruce) #4

I’m sorry I worded that poorly. I haven’t noticed a hit yet either, but my code base is fairly small at the moment and I was just curious if you had any experience testing these with larger projects.

I will let you know if I do run into anything.

(Aleksandr Kuzmenko) #5

On my MacBook Pro (Mid 2015), 2,2 GHz Core i7:
Null safety check for Haxe compiler unit tests takes ~60ms.
Null safety for VSHaxe (Haxe plugin for Visual Studio Code) takes 4ms

You can run your compilation with --times argument. And if null safety takes longer than 1ms, you will see it in the report.