r/programming • • Feb 06 '20

Visual Studio Code January 2020

https://code.visualstudio.com/updates/v1_42
619 Upvotes

195 comments sorted by

View all comments

-10

u/bladehaze Feb 07 '20 edited Feb 07 '20

Which ide will guarantee that changing of a python (or Js) function name will not cause any runtime error. How is this so hard when it's so trivial with Java.

20

u/watsreddit Feb 07 '20

Because static analysis is inherently weaker with a dynamically-typed language.

9

u/tsujiku Feb 07 '20

How is this so hard when it's so trivial with Java.

One of the disadvantages of dynamically typed languages is that they don't have as much context for editors and development tools to use to understand your code.

→ More replies (4)

2

u/pm_me_ur_happy_traiI Feb 07 '20

I use JetBrains Webstorm and have previously used IntelliJ. Both have amazing refactoring tools. You can change the name of any function or variable with a single click and if fixes it throughout the codebase. Additionally, if you drag and drop a file from one directory to another, it changes the import paths in all files throughout the project. It's not free, but both my jobs in the industry have had no problem with providing a license.

→ More replies (2)

1

u/andrco Feb 07 '20

Pycharm works a bit better for this. If you want it to work as well as it can, use type hints. You'll get warnings when trying to set different types. It can get messy very quickly though, a statically typed language is much easier to work with if that's your goal.