What about including mutation information in the stack comment? So for
instance, sequences:copy would be:
: copy ( src i dest! -- )
...
And if something has a side-effect on something not on the stack then it can
have some other notation:
: set ( value variable -- !)
...
By setting these comments on primitives we could infer them about other
words like we do with stack effects.
Of course, it's still confusing to use ! for this, but any old
non-alphanumeric character will do. What about #?
Alex
On 14/12/2007, Slava Pestov <[EMAIL PROTECTED]> wrote:
>
> The thing is that while Scheme code is mostly functional, some Factor
> code performs a lot of mutation -- anything that uses variables,
> hashtables, etc. I'm not sure having ! suffixes would really help.
>
> Slava
>
> On 13-Dec-07, at 3:01 PM, Bruno Deferrari wrote:
>
> > If I understand correctly, the problem isn't wanting # to be the
> > comment character or that ! isn't good by itself, it is that it would
> > be nice to use ! in words that perform side effects (like in Scheme)
> > without making things confusing.
> >
> > Also, instead of # I would use ` as I find # more useful to have as a
> > word (or as part of a word).
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services
> for just about anything Open Source.
>
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk