>>>Good point, and now for the lazy ones
>>>
>>>Create the function my_ctod as above
>>>
>>>Now use your global include file and add
>>>
>>>#DEFINE CTOD my_ctod
>>>
>>>
>>>Precompiler replaces CTOD with my_ctod. Done. No replace anywhere else.
>>
>>Hi Lutz.
>>
>>Your solution might work, but my argument it would be confusing to a future maintenance developer who sees input to what seems like CTOD() using parameters inconsistent with the expectations of a British date.
>>
>>I would choose to manually replace each instance (or programmatically do so in this case) to keep it clear.
>>
>
>I agree completely with Rick in this regard. Those backdoor tricks only increase technical debt and will for sure bite you back at one time.
>
>Even better try to upgrade the affected data with non-ambigous values if possible.
>
>"Always code for the maintener:
>Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live."
>
>
http://wiki.c2.com/?CodeForTheMaintainerWhile I see a certin point. I do not agree.
- I do not get paid for. I get paid for the hour I can sell. If my hour for such a fix is 10 minutes I get the same as if this is a 120 min hour. 110 minutes I can spend with something less boring.
Customer satisfaction is the same. I get paid for the knowledgde of fast work - and for beeing rested on the next hickup.
- Look what other langs do with objects overloading, look for eventbinding. This all adds up stuff you don't see in the code straight - I have no problem with #DEFINE. It's not hidden, it's no backdoor. The maintainer not knowing the header files firsthand does a bad job.
- All the arguments pro maintainer have only one goal. Do make the programmer interchangeable like a leaf of bread. Neoliberalism at it's finest.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]