Top "Language-implementation" questions

Having to do with issues arising when implementing a programming language.

Why are all fields in an interface implicitly static and final?

I am just trying to understand why all fields defined in an Interface are implicitly static and final. The idea …

java interface static final language-implementation
PyPy -- How can it possibly beat CPython?

From the Google Open Source Blog: PyPy is a reimplementation of Python in Python, using advanced techniques to try to …

python pypy language-implementation
Internal implementation of java.util.HashMap and HashSet

I have been trying to understand the internal implementation of java.util.HashMap and java.util.HashSet. Following are the …

java hashmap hashcode hashset language-implementation
How is the C++ exception handling runtime implemented?

I am intrigued by how the C++ exception handling mechanism works. Specifically, where is the exception object stored and how …

c++ exception error-handling language-implementation
Why is __FILE__ uppercase and __dir__ lowercase?

In Ruby 2.0.0-p0, the __dir__ variable was introduced for easy access to the directory of the file currently being executed. …

ruby syntax language-implementation
How could one implement C++ virtual functions in C

The C++ language provides virtual functions. Within the constraints of a pure C language implementation, how can a similar effect …

c++ c language-implementation
How is foreach implemented in C#?

How exactly is foreach implemented in C#? I imagine a part of it looking like: var enumerator = TInput.GetEnumerator(); while(…

c# foreach language-implementation language-specifications
Matlab: how to implement a dynamic vector

I am refering to an example like this I have a function to analize the elements of a vector, 'input'. …

matlab dynamic vector language-implementation
How are java interfaces implemented internally? (vtables?)

C++ has multiple inheritance. The implementation of multiple inheritance at the assembly level can be quite complicated, but there are …

java interface internals vtable language-implementation