
My
last post about the new element “dynamic” caused a wave of reviews that are not usual for discussing new elements or features of the language. Many were excited and excited, but there were also those who were upset that their language would “marry” with a new element.
In C #, this situation was for the var element in the past and is being repeated now for dynamic. I don’t know, maybe there are seven circles of hell when their favorite programming language gets new opportunities. (Disclaimer: Actually, all this nonsense is created by me)
1. Shock and denial
With the addition of a new element, there are reactions of shock and denial.
“Why did they add these lambdas? I just figured out the delegates! ”
“Crazy syntax. I will score on him "
"Generics will never steer!" Remember my words "
2. Shadows of Forgotten Ancestors
Even before the advent of new features, developers are beginning to feel nostalgia for the past, which has never happened.
“I loved the language X 10 years ago when it was not so bloated”
They forgot that in the past, it was necessary to introduce tight control of memory and many other operations, which were mired as in a quagmire.
')
3. Anger and apprehension, insecurity and doubt
Later, nostalgia turn into anger and fear, insecurity and doubt.
Look at the
reaction of adding “goto” in PHP
"This is problem. Seriously, PHP has always been without goto, why turn a language into a public threat? ”
“Yes Robin, PHP is a threat terrorizing Gotham. Quickly Betmobil! ”
Dynamic got like a bit of anger:
“C # was a great static language. If I need a dynamic language, I will use something else! ”
Or
"I will never use this functionality"
Shortly before, anger turns into fear, insecurity, and doubt. var in C # is a direct proof of this. Many developers mistakenly wrote that the code will no longer be strongly typed, it all goes straight to hell.
“My friend used var in his program, which was lit up and she independently formatted his hard drive, and also became to blame for the recent economic crisis. Cross on the belly "
They didn’t know, dynamic was already in development at that time, and he really would have fulfilled these promises;)
New functionality will destroy all life on the planet.
4. Depression, reflections and fortune telling
"Sigh. I know I have to learn a new feature, but I wonder how it affects performance? ”
It finishes me. Almost always, I see the first question from the developers about the new features of the language. “Does it work fast?”
I think thinking about this is a waste of time. For your site, which has 100 visitors per day, yes, there is enough productivity.
It is better to ask the question differently - “Does the application work fast enough for my requirements?”. And if not, then you should look for bottlenecks and optimize them. Your performance problems are in no way connected with the features of the language, but with errors at a higher level, such as the problem of
Select N + 15. Light at the end of the tunnel
“Oh, using a new item did not format my hard drive. Maybe it's not so bad. ”
Now the developer begins to understand that the new functionality does not eat kittens for breakfast and is not the embodiment of the devil. Hey! It even has the right to legal use.
This is the stage where you see a lot of experimentation with new features, as the developers try to figure out where this works well or vice versa.
6. The code became crazy
I think we all go through this phase from time to time. At some point, you realize that the new functionality is cool and you are happy as an elephant. In your hands is the Hammer of Thor and every line of code looks like a nail, ready to be hammered.
Many things can become ugly at this stage in a fit of excitement. Suddenly, every object is anonymous, every callback is a lambda expression and every method is generic, in any case where necessary and not necessary.
Probably a good idea to resist this, but at one point you give yourself freedom and enjoy a new feature of the language. Remember only one command.
svn revert –ROr another alternative command of your favorite version control system.
7. Approval and forgetfulness.
At this stage, the developer has finally adopted new features in the language like any other part of the language, as class or public elements. There is no need to use it without reason, or vice versa, wherever possible. The developer begins to use the functionality only where it is really needed.