On 02/07/2013, at 12:25 AM, srean wrote:
> 
>  Wait, this is important. My understanding is that functions are not pure in 
> the sense they can depend on mutable state maintained outside of their 
> write_scope, but they cannot have other side-effects. Are you telling me here 
> that I could use functions here and still do the I/O and that I dont need 
> generators here ?

I'm telling you that Felix doesn't enforce the rule about functions not having 
side
effects.

It may and indeed DOES assuming they don't for the purpose of optimisations.

However this is unlikely to have any bad impact on diagnostics.

On the contrary, it may show you if Felix optimised the code as
you expected or not.

Also don't forget if you write a C binding:

        fun f : int -> int = '(printf("%d", $1), $1)';

how the heck is Felix going to know you snuck in a side
effect there?

All Felix sees there is a blob of text.

--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to