T-F-S / csvsimple

A LaTeX package for lightweight CSV file processing.
http://www.ctan.org/pkg/csvsimple
LaTeX Project Public License v1.3c
24 stars 5 forks source link

New string and number test macros following `expl3` naming convention? #34

Closed muzimuzhi closed 7 months ago

muzimuzhi commented 8 months ago

In csvsimple-l3, it's a bit odd to me that \ifcsvstrequal (str equal) uses \tl_if_eq:eeTF (tl equal) internally.

I understand that the naming and behavior of \ifcsv(not)strcmp and \ifcsv(not)strequal are inherited from etoolbox package back to csvsimple v1.22 or older, but as csvsimple-l3 is programmed in expl3 code and doesn't load etoolbox any more by itself, following expl3 naming convention seems more natural.

For backward compatibility concerns, one possibility is to provide a new set of CamelCase macros like \IfCsvsimStrEqualTF and \IfCsvsimTlEqualTF. Csvsim instead of Csv is suggested, to align with expl3 module name csvsim in use. (A bit overlapping with functional package.)

T-F-S commented 8 months ago

I am also not happy with the (historic) naming.

The CamelCase macros are somewhat bulky and differ from the other \ifcsv..., but I also see no better way to keep the old ones for compatibility and introduce new ones. So, I adapt you proposal and add new CamelCase macros (but not for \ifcsvnotstrcmp). The old macros are not really deprecated, but I diminished them in the documentation.

muzimuzhi commented 8 months ago

I saw 6ca3a0a (2.6.0 (Preview 3), 2023-12-19) that added CamelCase macros, thanks!

T-F-S commented 7 months ago

Done with https://github.com/T-F-S/csvsimple/releases/tag/v2.6.0