4 ms·
Navigating a large code base that is dynamically typed like Python is far more tedious than something like C++ or C#. First you can't read what the types passe
by IshKebab 9y ago
Navigating a large code base that is dynamically typed like Python is far more tedious than something like C++ or C#.
First you can't read what the types passed into and out of functions are. You have to find their usages to work it out. Second, you can't reliable do things like "find usages" or "go to definition" because of the dynamic typing.
- toast0 9y agoMost of the c++ and c# code I see lately has so many things declared as auto, it's hard for me to figure things out too.
- klipt 9y agoWould be nice if IDEs had a key combo to fill in the actual type for "auto"s!
- maxxxxx 9y agoThat would be nice!
- tigershark 9y agoAre you using notepad to write c#? If you hover on the var you will see the tooltip with the type.
- toast0 9y agoWhen I was writing c#, I did use visual studio, but since I'm used to developing in a terminal editor, all these tooltips and things are a little tricky -- sometimes they disappear, and then I can't get them back, etc. But more often, when I'm looking at c# or c++, it's not code I wrote, it's not code I intend to change, it's code that's interacting with my code (written in another language) that I'm trying to see why it's misbehaving, so I can get the owner to fix it. I could be reading the code on GitHub or some other web view, I might have checked it out, but I have no interest in setting up a (probably new) IDE to look at it as the author would; I dig into too many projects to learn that many tools -- and deal with the upgrade cycle for them. Sure, it would be useful to hover and get more information, but I'm used to loosely typed languages, so it's not awful. It's just jarring to see that the type information is apparently not important enough to write down the name in c++ or c# anymore.
- andybak 9y ago> Second, you can't reliable do things like "find usages" or "go to definition" because of the dynamic typing. In my experience PyCharm can do both correctly for the vast majority of cases.
- walrus1066 9y agoStill very limited, for example, if I have: def some_func(foo): foo.run() ... Find usages in the run() method will return dozens of results, the IDE can't help you any more, to find what 'foo' is at runtime.
- andybak 9y agoIsn't that basically saying "it fails in the kind of cases that wouldn't even be possible in a statically typed language"?
- lmm 9y agoIndeed; it only fails in the really fiddly cases where you need it the most.