The input-data to the compiler can’t be handled by the JVM and vice versa.
The JVM handles byte code as input. The compiler handles source code as input.
That is two different functions with two different data domains.
They literally have different types!
Which one of the two functions is the thing you call “Java”?
I don't think it's worthwhile for anyone else to argue with you further. C++ and Java both support dynamic dispatch although you deny it.
You've taken up almost a full page of HN arguing with everyone trying to explain it to you. People have pointed you to wikipedia showing you that you're wrong. [1]
ISOCPP of which Bjarne is a director [2] says that C++ supports dynamic dispatch. [3]
And you continue to attempt to argue that everyone on HN, Wikipedia and the creator of the C++ language are all wrong and don't know what dynamic dispatch is.
Your continued insistence is both wrong and a negative impact at this point on hn. Please stop arguing something that numerous people have taken lots of patience and charity in trying every way possible to explain to you and what is clearly factually wrong.
If you're going to reply, please explain why an organization that Bjarne Stroustrup is a director of believes that C++ supports dynamic dispatch.
1. https://en.wikipedia.org/wiki/Dynamic_dispatch#C++_implement...
Terms in computing are so overloaded that these days I try[0] and never correct anyone on how they use a term. Instead I ask them to define it, and debate off of that definition.
So instead of downvoting this guy for using different terminology - we can ask him what he means and just have a discussion.
[0] alright I don't always succeed but it's an ideal to strive for
The problem in this discussion is that ukj has come to the belief (but communicated it poorly) that dynamic dispatch is somehow incompatible with static typing. And for some reason this also matters.
Static typing does not preclude dynamic dispatch, and despite being pointed to several mainstream languages that have both features, ukj decided to ignore reality or the common understanding of the phrase "dynamic dispatch" and produced this grotesque example of trying to communicate with an individual who is, apparently, just a troll. Feeding the troll, ukj, is probably the dumbest thing I did today, but I'll blame that on the insomnia reducing my ability to detect trolls.
According to the above definition C++ does not have dynamic dispatch!
The vtable in C++ is generated at compile time and used at runtime. It's immutable at runtime. That means it is NOT dynamic!
https://en.wikipedia.org/wiki/Virtual_method_table#Compariso...
"Virtual method tables also only work if dispatching is constrained to a known set of methods, so they can be placed in a simple array built at compile time."
Like, I don't care how you use words, but you (and everyone) are using "dynamic" to speak about a statically-behaving system!
Computation is a general, abstract and incredibly useful idea disconnected from any particular model of computation (programming language).
Different languages are just different models of computation and have different (desirable, or undesirable) semantic properties independent from their (trivial) syntactic properties.
It's this sort of angry dogmatism which prevents people from talking about programming language design.
Not for a second do they pause to think their own understanding may be limited.
The dogmatism demonstrated today was in your comments, ukj. Your inability to understand that your non-standard use of terms makes it impossible for others to communicate with you in any effective way made this a remarkable farce of a conversation or debate.
Because the meaning of "dynamic" is ambigous!
Since you are pointing me to wikipedia I'll point you right back...
https://en.wikipedia.org/wiki/Virtual_method_table#Compariso...
"Virtual method tables also only work if dispatching is constrained to a known set of methods, so they can be placed in a simple array built at compile time."
If the vtable is generated at compile and is constrained to a known set of methods then that array is immutable! Calling that "dynamic" is an obvious misnomer!
You are neither charitable nor patient. You are committing the bandwagon fallacy as we speak. You and the other 120 (and counting) angry downvoters ;)
I am using the word "dynamic" to actually mean dynamic! I am not going to define it. Use your judgment. Dynamic is NOT static. I am not asking you to "educate me", or to tell me I am right; or wrong. I am asking you to understand the sort of programming language design I have in mind!
Either you understand; or you don't.
for all expressions e:
if e type checks with type t, then one of the following holds:
- e evaluates to a value v of type t; or
- e does not halt; or
- e hits an "unavoidable error"
like division by 0 or null deref
(what counts as "unavoidable" varies from lang to lang)
Notice anything interesting about this definition? It uses the word "evaluate"! Type soundness is not just a statement about the type checker. It relates type checking to run time (and thus to compilation too). That is, if you muck with Java's runtime or compiler, you can break type soundness, even if you don't change its type system in the slightest.Different implementations of eval() a.k.a different programming languages have different semantics.
Which implicit eval() implementation does the above hold?
What type system do you have in mind such that the above holds for ALL expressions. Type-checking itself is not always decidable.