4 ms·
I don't necessarily disagree with the article, but maybe the solution is a new kind of search. One which understands languages, statically analyzes a source tre
by willurd 13y ago
I don't necessarily disagree with the article, but maybe the solution is a new kind of search. One which understands languages, statically analyzes a source tree, and searches the ASTs for the tokens you're interested in.
This would also have the side benefit of being able to produce better designed search results.
EDIT: I suppose searching the AST wouldn't be enough, you would have to evaluate the code to some extent to be able to search these properties.
- quacker 13y agoYeah. This is my biggest gripe working with dynamically-typed languages, especially if the project is at all large. If I have SublimeText or Vim, I'll be equally productive in Python as I'd be in Java. But give me Eclipse/IntelliJ, and I can blow the pants off myself in terms of efficiency working in Java compared to working in Python with any Python IDE (that I'm aware of). There are just so few good tools for dynamic languages compared to static languages. The situation is uniquely bad in JavaScript, since JavaScript doesn't formally have modules, functions can take any number of arguments, there's the funky scoping, and so forth. Not that good tools don't exist, but it makes it difficult for a JS IDE to enable working across files like a Java IDE can.
- willurd 13y agoAgreed, maybe that's why fewer tools (if any) exist to do things like programmatic refactoring in JavaScript (does WebStorm do that at all?) That being said, I've found the language a pleasure to work with (aside from browser incompatibility issues) and with the proper application of design principles such as modularity (check out require.js and the r.js optimizer) and, yes, DRY, I can be just as productive, if not more so, in JavaScript as I am in any statically-typed language.
- Peaker 13y agoWhich statically-typed languages have you tried?
- willurd 13y agoI've got varying degrees of experience (some professional, some not) with C++, C, Objective-C, Java, ActionScript 3. EDIT: Also C# (so many languages, I can't even remember which ones I've used sometimes). I'm also not including TypeScript or Dart (optional static typing), which I've technically "tried", but don't know much about.
- Peaker 13y agoThe ml style statically typed languages are very different from all of these (in good ways). For example, in Haskell you can write code as if you're in a dynamic language without annotating all the types and yet you get all of the benefits of types. It's the best of both worlds. Concluding that static languages suck after using java and c++ et al is a common mistake, and is understandable.
- willurd 13y agoWell, I never said static languages suck :) I really like static typing actually, and have seriously thought about using TypeScript or Dart. I've also got years of professional experience with C++ and AS3 and I love them both. I think Java is a fantastic language. And Objective-C...is growing on me ;) What I did say was that I can be just as productive in those languages as I am in JavaScript, if not more so. It remains to be seen whether I can gain more productivity with TypeScript or Dart.