News for hackers. Stuff that matters.
Re:CLion Nova Explodes onto the C and C++ Development Scene by dataflow on Thursday November 09, 2023 @11:16AM (#38206951)
> 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.

Re:CLion Nova Explodes onto the C and C++ Development Scene by mxz3000 on Thursday November 09, 2023 @11:37AM (#38207234)
I 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?

Re:CLion Nova Explodes onto the C and C++ Development Scene by katbyte on Thursday November 09, 2023 @11:46AM (#38207365)
Well pr reviews are usually don’t in gh or other web platform so, many people?
Re:CLion Nova Explodes onto the C and C++ Development Scene by menaerus on Thursday November 09, 2023 @11:53AM (#38207464)
I 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.

Re:CLion Nova Explodes onto the C and C++ Development Scene by layer8 on Thursday November 09, 2023 @12:23PM (#38207924)
If 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.

Re:CLion Nova Explodes onto the C and C++ Development Scene by dataflow on Thursday November 09, 2023 @01:11PM (#38208526)
IDEs 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.
Re:CLion Nova Explodes onto the C and C++ Development Scene by fluoridation on Thursday November 09, 2023 @01:44PM (#38209083)
>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.

Re:CLion Nova Explodes onto the C and C++ Development Scene by fotta on Thursday November 09, 2023 @11:24AM (#38207074)
it's like trying to read untyped python code, which is my personal hell
Re:CLion Nova Explodes onto the C and C++ Development Scene by hardware2win on Thursday November 09, 2023 @11:30AM (#38207148)
I do wonder, you arent using IDE?
Re:CLion Nova Explodes onto the C and C++ Development Scene by _aavaa_ on Thursday November 09, 2023 @11:44AM (#38207333)
In my experience even something like Pycharm can't inference types properly across function boundaries unless you explicitly provide type hints.
Re:CLion Nova Explodes onto the C and C++ Development Scene by hardware2win on Thursday November 09, 2023 @01:16PM (#38208611)
But hes talking about cpp
Re:CLion Nova Explodes onto the C and C++ Development Scene by _aavaa_ on Thursday November 09, 2023 @03:04PM (#38210390)
I misunderstood you I guess. I thought you meant using an IDE to infer the types for untyped Python.
Re:CLion Nova Explodes onto the C and C++ Development Scene by vincnetas on Thursday November 09, 2023 @11:47AM (#38207385)
One could be reading from browser (git/hub/lab)
Re:CLion Nova Explodes onto the C and C++ Development Scene by linhns on Thursday November 09, 2023 @12:01PM (#38207583)
I 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.
Re:CLion Nova Explodes onto the C and C++ Development Scene by dataflow on Thursday November 09, 2023 @01:04PM (#38208453)
> 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.