Nim icon indicating copy to clipboard operation
Nim copied to clipboard

Undeprecate isvalidfilename

Open juancarlospaco opened this issue 2 years ago • 3 comments

  • Remove deprecated isValidFilename.

juancarlospaco avatar Mar 24 '22 13:03 juancarlospaco

Any news with this one, is there any critical blocker ?. 🙂

juancarlospaco avatar May 04 '22 16:05 juancarlospaco

Instead undeprecate it. It does what its documentation says? What's the issue again, that people use things without reading the docs? What kind of criterion is that?

Araq avatar Sep 02 '22 06:09 Araq

@Araq The problem is that a "valid" filename depends on both the operating system and file system being used - it's a fundamentally flawed approach. It's better to just... attempt to create a file with a given filename.

See my comment here, from previous discussions regarding this function.

Varriount avatar Sep 03 '22 23:09 Varriount

The problem is that a "valid" filename depends on both the operating system and file system being used - it's a fundamentally flawed approach.

I remember the discussion and your point is valid but it's useful enough in practice.

Araq avatar Sep 29 '22 10:09 Araq

Thanks for your hard work on this PR! The lines below are statistics of the Nim compiler built from 1e635bb539839cab8b7552df9ca0a073dfa523fa

Hint: mm: orc; threads: on; opt: speed; options: -d:release 164356 lines; 15.295s; 665.059MiB peakmem

github-actions[bot] avatar Sep 29 '22 10:09 github-actions[bot]