• 0 Posts
  • 67 Comments
Joined 2 months ago
cake
Cake day: July 29th, 2024

help-circle







  • The problem with dynamic typing is you can’t always figure out what the type is even with investigation as it can be lots of things based on what is passed or returned. It also allows incorrect values to be passed.

    People will indeed make that readability argument but if the type is not obvious and important to understanding the code then it likely shouldn’t be used there.



  • auto isn’t dynamic typing it’s just type inference. It still has a fixed type you just don’t have to write it. Like var in C#.

    Lambdas are just a way of defining methods in place. It has nothing to do with callbacks.

    But you’re spot on for memory safety. Managing it yourself is risky and if it can be managed at zero cost it seems stupid not to.