I know that this has been discussed many times, but I'm not sure I really understand Why Java and C # designers decided to leave this facility from these languages. I'm not interested in how I can work (using interface, cloning, or any other option), but in the logic behind the decision.
From the language design standpoint, why is the facility being denied?
PS: I am using words like "omitted", which can be insufficient to some people, as C # was created in an additive (rather subtractive) approach However, I am using such words because these languages were present in C ++, before these languages were designed, so it was left in the spirit of being removed from the programmers' toolbox.
In the interview, Anders said:
Anders Hejelsberg: Regarding the Conte, this is interesting Because we also tell that complaint all the time: "Why do not you?" The question is involved, "Why do not you do that which is implemented by runtime?" In fact, people are asking, Do not come and say that in this way.
Working in C ++ Because the reason for this is that you can remove it. If you can not overcome it, then your world will have to suck. If you declare a method that takes a const bla, then you can call it a non- You can pass the protest but if this is the way around you, then you can not do it. If you declare a method that takes non-bust, then you can not give it a single blow, now you are trapped. You have gone Really requires a const version of everything that is not const, and you end up with a shadow world. In C ++ you participate with it, because with some in C ++ this is pure The form is optional whether you want this check or not. If you do not like it, you can just make the construction a strange one.
Comments
Post a Comment