by emidln · 11y ago · 0 comments
How does any IDE or editor know what some_function would be passed without a severe amount of inspection?
I might be wrong on my definitions, but almost by definition, there's just not enough information before runtime in dynamic systems to infer enough to do any real refactoring or smart completion.
I use PyCharm everyday, and I like it, but it's refactor menu is limited, can fail, and pales in comparison to my uses of java w/ IntelliJ or even a well hinted php app w/ PHPstorm.
Check for example the typical Smalltalk or Lisp environment. The editor asks the runtime.
Since many of those languages are object-oriented, you'll know the class:
(defmethod hide ((w window)) ...)
Oh, w is a window...
- When two equivalent anonymous functions can be extracted out?
- When a library method already exists for an expression?
- When you fail to match every possible result in a case statement?