Skip to main content
Tweeted twitter.com/StackSoftEng/status/1329620784462110721
Became Hot Network Question
edited title
Link
Robert Harvey
  • 200.7k
  • 55
  • 470
  • 683

Why method clashes were introduces in newestdefault methods introduced to Java versions?

deleted 226 characters in body
Source Link
Robert Harvey
  • 200.7k
  • 55
  • 470
  • 683

Was introducing default methods to java inevitable? As far as I know multiple class inheritance was not introduced to avoid difficulties with the method signature clash in base classes. So

So we avoided it with classes and on the other hand we introduce this problem with default methods as we have to override default method if it exists with the same signature in two or more interfaces that we implement. Is

Is the cost of updating old systems to newer versions of interfaces without using default methods greater than cost of using language with garbage in its syntax? I know this question may seem a bit off-topic and causing subjective comments but I am myself a Java developer so I am not writing from a hater point of view. Just want to know why above mentioned architecture rule was broken...

Was introducing default methods to java inevitable? As far as I know multiple class inheritance was not introduced to avoid difficulties with the method signature clash in base classes. So we avoided it with classes and on the other hand we introduce this problem with default methods as we have to override default method if it exists with the same signature in two or more interfaces that we implement. Is the cost of updating old systems to newer versions of interfaces without using default methods greater than cost of using language with garbage in its syntax? I know this question may seem a bit off-topic and causing subjective comments but I am myself a Java developer so I am not writing from a hater point of view. Just want to know why above mentioned architecture rule was broken...

Was introducing default methods to java inevitable? As far as I know multiple class inheritance was not introduced to avoid difficulties with the method signature clash in base classes.

So we avoided it with classes and on the other hand we introduce this problem with default methods as we have to override default method if it exists with the same signature in two or more interfaces that we implement.

Is the cost of updating old systems to newer versions of interfaces without using default methods greater than cost of using language with garbage in its syntax?

Source Link
bridgemnc
  • 261
  • 1
  • 7

Why method clashes were introduces in newest Java versions?

Was introducing default methods to java inevitable? As far as I know multiple class inheritance was not introduced to avoid difficulties with the method signature clash in base classes. So we avoided it with classes and on the other hand we introduce this problem with default methods as we have to override default method if it exists with the same signature in two or more interfaces that we implement. Is the cost of updating old systems to newer versions of interfaces without using default methods greater than cost of using language with garbage in its syntax? I know this question may seem a bit off-topic and causing subjective comments but I am myself a Java developer so I am not writing from a hater point of view. Just want to know why above mentioned architecture rule was broken...