chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] Re: .exports not renamed w/ CMake Windows build


From: Brandon J. Van Every
Subject: Re: [Chicken-hackers] Re: .exports not renamed w/ CMake Windows build
Date: Mon, 08 Jan 2007 16:57:38 -0800
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)

Kon Lovett wrote:
On Jan 8, 2007, at 9:43 AM, Brandon J. Van Every wrote:
<snip>

I'm asking whether lumping all these under one name is a basic error of Chicken's design. What do Chicken programs do when ported from Unix to Windows? Just gratuitously fail, looking for exports that aren't there? I'll wager that historically, programs haven't been ported from Unix to Windows very often, so the issue hasn't come up.

I see at least 2 correct philosophies for dealing with this:

1) keep the .exports different. Make the programmer deal with whether they're using posixunix, posixwin, pcre, pregexp, or regexunix.

2) make the .exports identical in content, and create stub functions for whatever's missing, perhaps giving a diagnostic error. That way when the program dies, at least the user knows why.

In reaction to this, you might say, "Well I just want it to be (use posix) and (use regex). I don't want to type anything new / different than what's in the manual, I just want it to work." But it isn't going to work. At least not generally speaking; it only works if you happen to use a supported subset. I am saying, the programmer has to deal with the available functions somewhere, somehow, if the program is to be well-behaved.

Yes. Use the supported subset. Use #+windows/#+unix otherwise.

I'm not clear what interface you're referring to here? I can't seem to find this in the docs.



The design flaw would be separate code for each platform.

There's always going to be separate code for each platform. That's the reality of unequal resources in open source development. I think you meant, "The design flaw would be requiring a choice between (use posixunix) and (use posixwin)."

Well what about a choice between (use posix), (use posixunix), and (use posixwin) ? Where 'posix' would only export the common subset. Similarly, (use regex) would only export the common subset of regexunix, pregexp, and pcre.

This would be implemented by moving common functions into new posix.scm and regex.scm files. (use posixunix) would imply (use posix) and would add the Unix-only functions.


Cheers,
Brandon Van Every





reply via email to

[Prev in Thread] Current Thread [Next in Thread]