Western rises (16): C # is too ugly

xiaoxiao2021-03-14  194

A few days of program, I think this C # is really ugly can't go ... these days have been fighting one, for example, I turn an interface into an abstract class, a good guy, first soon with all the methods, beforehand Abstract, then all subclasses are implemented, with Override, a good change ... more intuitive is that this step is to divide it into two interfaces, wait until the abstract class is deleted, but also to put all subclasses The implementation method removes Override, it is also a good change ... this guy has more than a dozen subclasses in the rest of the project, that is quite a quite big Asia ~~~~ So, it is clear, think about it. Still need to interface ... all are C # gives it.

Not much, I haven't given me a whole protected interunity, and I am a glimpse. Which one is? Protected and INTERNAL, this is clear enough, and if you don't care about my feelings. There is no in anonymous internal class, and each Visitor I have to create a class to create a class. I know that this class will not use it for the second time. If you have a loss, there is Delegate 哟 ~~~ However, this 1.1 in the gram of delegate is also ugly, good home is also improved in 2.0 ... 1.1 Do not count it, there is no generic jam ...

In fact, not light is C # ... Every time I look at a class of CLASS, when Mixin is Mix, I feel that the dresses are depressed, Annotation writes a few Metadata is not to have an opportunity to explain in the container. No Delegate's Java, Functor wrote 5 line code for anonymous internal classes, FunctionAlity is a line. C #, DELEGATE, DELEGATE is quite like Closure, but this context is not right ... use three different high order to achieve the same function, the conclusion is not good, follow the pile of objects almost. Although the object is not so easy to reuse, it can be used to reuse those functor if it is estimated.

Don't say anything else ... I am actually a polymorphism, it is better to save a variable in the object, and the variable is a program. When you run it, you will take this program out to Eval, not to create a few subclasses. ......

(Don't provoke language wars ... Write C # write depressed, slightly vent ... Mo wants to be true, don't be true.)

转载请注明原文地址:https://www.9cbs.com/read-129217.html

New Post(0)