Hacker News new | past | comments | ask | show | jobs | submit login

> being able to build complex smart views which can easily be refactored using native programming language constructs

For the record, JavaScript can not be easily refactored, since it's a scripting language with no strong types and no compilation phase, so to conduct a complex refactoring you will have to load all code base in you head and that's far from being easily. TypeScript for example is another matter.




That's what regression tests are for.

Also, no amount of compiling or strong typing is a sufficient alternative to regression testing when it comes to refactoring.


> That's what regression tests are for.

Don't loose the point, I was written about another thing, not about tests. Every time when fanboys of functional programming (and scripting) are trying to argue that functional programming is a silver bullet they do write about tests, it's not an argument, tests are exists for any kind code no matter the code nature. Tests won't help you a lot with code analyzing, automatic refactoring and tracking down from where things came (coupling). In case of scripting (and functional programming) you will have to load all the code base in you head and only then you will be able to make some architectural decisions or perform a complex refactoring. Tests just help you to not break the system logic doing refactoring, that's it.

> Also, no amount of compiling or strong typing is a sufficient alternative to regression testing when it comes to refactoring.

No one was saying that compiling or strong typing is alternative to regression testing, don't know where you have got that idea.


Regression tests can automate refactoring steps???




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: