Hi, thanks for the comment. This code snippet should only demonstrate the refactoring process with a little practical example. Your approach is totally right when having all the code in your hand. But when dealing with existing systems or only parts of the code, sometimes a neutral generic solution is necessary. But as mentioned before it's example code to demonstrate the process.
Hi, thanks for the comment. This code snippet should only demonstrate the refactoring process with a little practical example. Your approach is totally right when having all the code in your hand. But when dealing with existing systems or only parts of the code, sometimes a neutral generic solution is necessary. But as mentioned before it's example code to demonstrate the process.