How can I disable compiler warnings in Eclipse on a file specific basis? [duplicate]

Ensure the files are under the gen folder, the typical home for all generated .java files. Then in the project properties, under Java Build Path, set Ignore optional compile problems for that folder to Yes. If your project structure requires your files be in a folder other than gen, add that folder to the Java … Read more

Interpreters vs Compilers vs Virtual Machines

A virtual machine isn’t exactly an alternative to compilers or interpreters. I think you are thinking of a JIT compiler, which is how many VMs are implemented. A virtual machine itself is exactly what the name says – it’s a machine (processor) that doesn’t actually exist. For example, most processors don’t have any intrinsic way … Read more

Which C99 features are available in the MS Visual Studio compiler?

Fortunately, Microsoft’s stance on this issue has changed. MSVC++ version 12.0 (part of Visual Studio 2013) added support for _Bool type. Compound literals. Designated initializers. Mixing declarations with code. __func__ predefined identifier. You can check the _MSC_VER macro for values greater than or equal to 1800 to see whether these features are supported. Standard library … Read more

How to write the Visitor Pattern for Abstract Syntax Tree in Python?

Wikipedia has a great overview of how the Visitor pattern works, although the sample implementation that they use is in Java. You can easily port that to Python, though, no? Basically, you want to implement a mechanism for double dispatch. Each node in your AST would need to implement an accept() method (NOT a visit() … Read more

CoffeeScript-like language for C/C++

I think this is possible, and even desirable (I grudgingly deal with C++ when writing Node.js native modules), but more challenging than with a higher-level language like JavaScript. What you’re asking for is a language that would provide syntactic sugar without sacrificing performance or flexibility. Some syntactic sugars (say, syntactic whitespace or Ruby-style def/end blocks … Read more