Skip to main content
added 147 characters in body
Source Link
Kilian Foth
  • 110.3k
  • 45
  • 300
  • 321

It's certainly a valid reason.

Whether that's enough of a reason to avoid auto in your situation - that depends on whether there are superior reasons for using it. (PresumablyPresumably you can find such reasons in the design documents that led to introducing auto in the first place)place; here's a paper by Stroustrup et al. that introduces the concept.

(Personally, I'm a huge fan of type systems doing work that you'd otherwise have to do in your head. So to me, the ideal way of doing type inference would be simply to write "auto" and the IDE replacing it with the type that it has inferenced - which would combine the advantages of both worlds. But apparently not enough people think that to make it happen.)

It's certainly a valid reason.

Whether that's enough of a reason to avoid auto in your situation - that depends on whether there are superior reasons for using it. (Presumably you can find such reasons in the design documents that led to introducing auto in the first place).

(Personally, I'm a huge fan of type systems doing work that you'd otherwise have to do in your head. So to me, the ideal way of doing type inference would be simply to write "auto" and the IDE replacing it with the type that it has inferenced - which would combine the advantages of both worlds. But apparently not enough people think that to make it happen.)

It's certainly a valid reason.

Whether that's enough of a reason to avoid auto in your situation - that depends on whether there are superior reasons for using it. Presumably you can find such reasons in the design documents that led to introducing auto in the first place; here's a paper by Stroustrup et al. that introduces the concept.

(Personally, I'm a huge fan of type systems doing work that you'd otherwise have to do in your head. So to me, the ideal way of doing type inference would be simply to write "auto" and the IDE replacing it with the type that it has inferenced - which would combine the advantages of both worlds. But apparently not enough people think that to make it happen.)

Source Link
Kilian Foth
  • 110.3k
  • 45
  • 300
  • 321

It's certainly a valid reason.

Whether that's enough of a reason to avoid auto in your situation - that depends on whether there are superior reasons for using it. (Presumably you can find such reasons in the design documents that led to introducing auto in the first place).

(Personally, I'm a huge fan of type systems doing work that you'd otherwise have to do in your head. So to me, the ideal way of doing type inference would be simply to write "auto" and the IDE replacing it with the type that it has inferenced - which would combine the advantages of both worlds. But apparently not enough people think that to make it happen.)