3 ms·
> Some teams discourage it because it makes code reviews a little harder Not just reviews, but anything that involves reading the code (which is frequently usa
by dataflow 3y ago
> Some teams discourage it because it makes code reviews a little harder
Not just reviews, but anything that involves reading the code (which is frequently usage and maintenance). Swimming in a file where everything is auto is a special kind of hell. It's like having no firm ground to step on.
- fotta 3y agoit's like trying to read untyped python code, which is my personal hell
- hardware2win 3y agoI do wonder, you arent using IDE?
- _aavaa_ 3y agoIn my experience even something like Pycharm can't inference types properly across function boundaries unless you explicitly provide type hints.
- hardware2win 3y agoBut hes talking about cpp
- _aavaa_ 3y agoI misunderstood you I guess. I thought you meant using an IDE to infer the types for untyped Python.
- vincnetas 3y agoOne could be reading from browser (git/hub/lab)
- mxz3000 3y agoI would expect most people to read code in their IDEs, where small amounts of type inference like this is fine because the IDE tells you what the type is. I agree that if you spend a lot of time reading code in something like GitHub, not having explicit types is annoying, but seriously, who does that?
- katbyte 3y agoWell pr reviews are usually don’t in gh or other web platform so, many people?
- menaerus 3y agoI can come up with a few more examples. - No review tool is capable of providing type inference hints. - Not everybody's development workflow consists of using the IDEs. - Development/debugging on remote machines does not even have a GUI to start with - so no IDEs there as well.
- layer8 3y agoIf the IDE only displays the type on hover, that’s a significant usability regression. It also makes it harder to grep for usages of any given type. Of course IDEs could help with that too, but I don’t know any that provide that functionality.
- dataflow 3y agoIDEs don't always display every type in a useful way. Sometimes they just display an unhelpful alias which ends up being just as useless. Sometimes they display an incredibly verbose version with all the default template parameters written out, making it a nightmare. Sometimes they give useless results, like when you have a dependent type whose concrete type you know (imagine typename T::value_type vs. size_t). Sometimes they haven't even finished analyzing the code yet. I could go on. You should not be crippled without your IDE.
- fluoridation 3y ago>You should not be crippled without your IDE. Can you compute elementary functions by hand? Why not? Why are you crippled without semiconductors? This attitude leads to never being able to use better tools. We can't leverage an IDE because then we're "crippled" when we don't have it, so we continue writing code as if it was the '70s and the best we have is ed.
- linhns 3y agoI used to despise auto as well but with new standards it’s just powerful. It’s better to truly understand how type deduction works, you’re gonna be a much better C++ programmer.
- deleted 3y ago[deleted]
- dataflow 3y ago> It’s better to truly understand how type deduction works, you’re gonna be a much better C++ programmer. I understand how type deduction works just fine, thank you. Your assumption that I (or many others) have this stance based on some lack of understanding of how type deduction works is extremely wrong, and completely missing the arguments people are actually making.