>
> We can but we used to not intorduce new public functions without HB_ prefix
> to not cause problems with 3-rd party or user code which may already use
> functions with the same names.
> Anyhow here we have yet another aspect. These functions are already
> implemented in some xbase compatible languages. For sure in CLIP and
> AFAIK in VFP.


> so we cannot be CLIP and xHarbour compatible in the same time.
> Does anyone knows sth about these functions in other languages?
> If the results are not compatible then probably the best choice is
> not implementing TTOS()/STOT() at all so users can write their own
> wrappers depending on preferred compatibility, f.e. for CLIP compatibility:
>   FUNC TTOS( tTimeStamp )
>   RETURN HB_TTOC( tTimeStamp, "YYYY-MM-DD HH:MM:SS" )
> or:
>   FUNC TTOS( tTimeStamp )
>   RETURN HB_TTOC( tTimeStamp, "YYYYMMDDHHMMSS.FFF" )
> for xHarbour.


I think Harbour shouldn't implement a TTOS() function.

Instead, we should have a HB_TTOS() without any restrictions
regarding compatibility. Anyhow xhb solution looks good, and
if it _is_ good, we can use it, but if there is any problem with it,
lets get over it and solve it here properly, so lets not be constrained
by xhb compatibility, since there are other means to address that.

To help compatibility with other flavours, we can implement
100% compatible functions with names:
CLIP_TTOS()
XPP_TTOS()
XHB_TTOS()
VFP_TTOS()

We can even have these in parallel, and if we go this route,
we should gather all these <dialect>_*() dialect prefixed
functions in separate files (for clarity and future development),
and user can easily map the one they need using
"FUNC TTOS( x ) ; RETURN *_TTOS( x )" [ or with null
overhead in C ], or even use them in parallel. Later we can
move these dialect dependent implementations into separate
libs, which would allow to use the original names, of course
in this case collision may occur if someone links multiple
one with such colliding names, but I don't this is a problem
in practice.

Brgds,
Viktor
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to