News for hackers. Stuff that matters.
Re:Python Tools for Visual Studio by to3m on Tuesday July 02, 2013 @08:05PM (#5981540)
I have to second this. I hear VS>=2010 uses the compiler infrastructure to generate the intellisense data, rather than doing it (as VS<=2008) by simple text processing, and it's made a huge difference in terms of reliability. As well as improved support for templates, it also does a good job of handling code generated by macros. Newer Visual Studios might prove that the question "OMFG what could POSSIBLY be worse than the VS2008 C++ build system?" isn't actually rhetorical after all, but the code completion is much improved.

(On another note, Xcode. I'm normally pretty negative about Xcode, because it's mostly awful. But I believe its code navigation and code completion is done in a similar way - only using LLVM, of course - and that part does work extremely well. If anything, it's actually slightly better than Visual Studio, because its navigation shortcut is much better about giving you a popup list of all possible reasonable destinations, e.g., if you try to go from a member function call to its definition when that function is virtual.)

Re:Python Tools for Visual Studio by int_19h on Tuesday July 02, 2013 @08:54PM (#5981718)
>> I hear VS>=2010 uses the compiler infrastructure to generate the intellisense data, rather than doing it (as VS<=2008) by simple text processing, and it's made a huge difference in terms of reliability.

To be specific, what they did was take the EDG C++ front-end, and use it to drive all code intelligence features (code completion etc) - see http://blogs.msdn.com/b/vcblog/archive/2009/05/27/rebuilding.... That's why it can correctly handle all templates, macros etc.

Here's a nasty trick that I love to play on unsuspecting C++ IDEs:

  template<int = sizeof(void*)> struct foo;
  
  template<> struct foo<4> {
    template<int> struct bar {};
  };
  
  template<> struct foo<8> {
    enum { bar = 0 };
  };
  
  float baz;
  
  int main() {
    foo<>::bar < 123 > baz;
  }
The nastiness here is that the line of code inside main() should be parsed differently depending on pointer size on the target architecture. If it uses foo<4>, then it is a declaration of a local variable named baz, of type foo<4>::bar<123>. If it uses foo<8>, then it's an expression involving two comparison operators: ((foo<>::bar < 123) > baz) - referencing the global float baz.

Now, if you try the above in VS (2010+), you'll see that it will parse this correctly and give you the proper type info for baz (and "Find References" etc), which will change if you switch project configuration from "Win32" to "x64" and back.

Re:Python Tools for Visual Studio by ihnorton on Wednesday July 03, 2013 @09:40AM (#5984399)
> "OMFG what could POSSIBLY be worse than the VS2008 C++ build system?"

VS2008 C++ build system with CMake.