Re: Do we NEED a marker at all?
Alan Manuel Gloria 06 Sep 2012 12:36 UTC
On Thu, Sep 6, 2012 at 12:19 PM, Shiro Kawai <xxxxxx@lava.net> wrote:
> Here's my thought.
>
> Suggesting #!srfi-105 marker doesn't mean you should mark every file
> that uses srfi-105 with the marker. Some implementations may support
> srfi-105 by default, and interpret {} as curly-infix notation without
> the marker. If you *know* you use such implementations then you don't
> need to bother to mark up your code by #!srfi-105 at all.
>
> However, some other implementations may need to switch interpretation
> of {} file-by-file basis. Such implementation would add its own
> extension to the switch. Gauche will for sure, and for the backward
> compatibility, srfi-105 mode won't be the default, at least for
> a while (because I know some production code relies on the current
> interpretation of {} in Gauche).
>
> So, isn't it better that such implementations use the same marker,
> instead of having different markers? Then, if you wish your code
> to be extremely portable out-of-box, you add #!srfi-105 marker for
> extra safety. Of course, you can still distribute your code without
> the marker and just say "my code using srfi-105, please turn on the
> extension if you run it on an implementation that doesn't support
> it by default."
>
> If srfi-105 doesn't suggest the marker at all, the latter would be
> the only choice. I think it is better to have another option.
I personally dislike #!srfi-105, but I won't actively oppose it.
Perhaps we should just generally encourage SRFI-105-by-default, but
suggest that writers of Scheme code should use #!srfi-105 explicitly
if portability across Scheme's is a concern.