article Axios article A report by Axios suggests that switching case in your code is becoming less common as you get older and as you spend more time working on it.
It also found that the number of people who use case has dropped from 41% of all projects to 27% of projects, with most of that shift coming in the last three years.
“For most projects, this change is a small one,” the report says.
“A developer working in the web developer domain will often be the one making the switch.”
In the years following the shift, case was seen as an essential component of many modern web apps.
While switching case has declined slightly, the report also says that switching it to plain objects is now more common than it was in the past.
The move to plain object vs. case is more common today than it’s ever been.
In fact, the percentage of code in the sample that used case decreased by more than 80% from 2000 to 2015.
“While we believe it’s important to continue to support case-based design patterns for future projects, we think it’s not an acceptable choice for developers today,” Wooril said.
There’s also been a shift in how developers interact with the code in their codebases.
While some of this change may have been driven by the rise in modern web standards like Sass and Less, it’s also likely that there’s been a lot of people adopting the shift in style, too.
“The new style is a much more natural choice for modern web development.
In this environment, we’re seeing a large majority of modern developers using the plain objects, and we’re also seeing that this is a significant departure from the style of the past,” Wootiwi says.
What are the big takeaways?
This report doesn’t say that you shouldn’t use the new case-friendly styles.
You can still use the older style, and you can still make the switch.
It’ll also help you avoid problems like duplicate styles and duplication in your source code.