On Sep 17 2026, 18:20 +0000, "Diego A. Mundo via Chicken-users" 
<[email protected]> wrote:

On Thursday, September 17th, 2026 at 13:56, Daniel Colascione via Chicken-users 
<[email protected]> wrote:

Why not just use mkstemp on platforms that support it and outsource the fiddly 
bits?

I think the why not may merely be that nobody has prioritized it and actually 
done the patch yet. I was just looking at what this would entail. We do have a 
file-mkstemp in (chicken file posix), which is implemented with mkstemp on unix 
and a custom function on windows, but:

a) At least the Unix version is currently broken on master, something to do 
with the new string representation and u8 vectors, though this seems like a 
simple fix.
b) This would be a backward-incompatible change, right? Which might be fine, I 
just don't see that mkstemp has a way to create a temp file with a particular 
extension. I don't know how many people were using that feature of 
create-temporary-file.

There's mkstemps for that. It's not standard, but it's available in the BSDs, macOS, Linux, and probably other UNIXes.

--
Pietro Cerutti
I have pledged to give 10% of income to effective charities
and invite you to join me - https://givingwhatwecan.org

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to