2 ms·
You have a point, but on the other hand, it is much easier to write (kNaverUrl + "index.html") than to write "www.naver.comindex.html". So it just opens door f
by yongjik 10y ago
You have a point, but on the other hand, it is much easier to write (kNaverUrl + "index.html") than to write "www.naver.comindex.html". So it just opens door for a different kind of bugs.
- zepolen 10y agoThen it becomes a function: kNaverUrl('index.html') Multiple functions: kNaverWwwUrl('index.html') kNaverApiUrl('resource') Then it get's refactored: urlGenerator('www.naver.com')('index.html') urlGenerator('api.naver.com')('resource') Refactored even more: urlFor('naver_www', 'index.html') urlFor('naver_api', 'resource') Even more! urlGeneratorFactoryFactory(.......