Open Tieske opened 4 years ago
As long as the original function name was linked to the platform specific function and Penlight was doing the platform detection I don't see why this would be breaking or require any understanding on the part of the application. The primary place it would make a difference is ease of testing Penlight itself, and that seems like a win.
@Tieske if you like one of my idea ... maybe you will be interested by the others ... 2 years ago, I made some experimentation on a forked Penlight humoristically named litepain. I was pretty sure my approach will only usefull for me, but maybe I'm wrong.
My experimentation was :
make a try with pl.path to split each function(or feature) in one "standalone" sub-module file. See the result : https://github.com/tst2005/lua-litepain/tree/litepain/lua/lp/path Each sub-module contain the load of dependencies, his own code, return the function.
Why do that ?!
Because I search a way to be able to take part of penlight, build an all-in-one special module file and include this stuff into my own projet. I already made lot of experiments about that...
It will be easier for me if the Penlight's code will be more "pickable". I know it is maybe a hard work... and most of the Penlight users will don't see the différence.
I just spoke about the concept.
Conclusion of my linepain experimentation :
I'm still open for discuss.
Enjoy!
This issue is relevant I think: https://github.com/lunarmodules/LDoc/issues/387
normalization depends on the use case;
as suggested by @tst2005 here: https://github.com/Tieske/Penlight/pull/331#issuecomment-667939801
instead of the path functions operating on the current system (either Windows or Unix), create 2 namespaces;
path.unix
andpath.windows
that implement their respective versions, and set the system one as the default.Questions;