6

Correct! With a lot of interpreters, most libraries – and even large parts of the standard library – are written in the interpreted language itself. That is inefficient, but this inefficiency might not matter. E.g. web applications are typically slow regardless of programming language used, because other effects (like network latency or database queries) ...


4

And what do you put in the vectors? Since it is a tree, you need to model depth. In languages with declarative types, that means a vector<vector<vector<vector… infinitely which isn’t actually denotable. Hence the recursive class.


3

Many programming languages have an implementation language (mostly a system language like C) which is used to implement important parts of the core of the language. This is not true. The vast majority of programming languages do not have an implementation language. For example, Ruby, Python, PHP, ECMAScript, Java, C#, Visual Basic.NET, Kotlin, Dart, Hack, ...


2

Some other answerers may be overthinking this. == compares two values. References are values. Objects are not. When you write int a = 5; int b = 5; System.out.println(a == b); the variable a contains the bits that make up the number 5, and so does the variable b. They are equal. When you write String a = new String("foo"); String b = new String(&...


2

It’s just historical. You use == to compare values. int and double are values in C. What about char* ? C tends to see the pointer as the value, not the C string, especially since char* could point to a single char, not a string. Therefore with char* the pointer is the value to be compared with ==. C++ is close enough to C that pointers to an instance of a ...


1

I think it's time for an Update because Microsoft did learn from their mistake and implemented value equality as a default. First with F#: type Person = { name: string } let p1 = { name = "Tom" } let p2 = { name = "Tom2".Substring(0, 3) } printfn "%A" (p1 = p2) // true And more recently with C#: record Person(string ...


Only top voted, non community-wiki answers of a minimum length are eligible