[Haskell-cafe] Yet another top-level state proposal
Isaac Dupree
isaacdupree at charter.net
Sat May 26 07:53:30 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Judah Jacobson wrote:
> Hi all,
>
> Given the recent discussion about adding top-level mutable state to
> Haskell, I thought it might be a good time to throw my own proposal
> into the ring. If enough people think it's worth considering, I can
> add it to the wiki page.
> (http://www.haskell.org/haskellwiki/Top_level_mutable_state)
>
> In contrast to recent proposals, this one requires no extra syntax or
> use of unsafe functions by the programmer. Any nonstandard "magic"
> that might occur is kept within the compiler internals. Furthermore,
> top-level initializations are only executed when needed; merely
> importing a module does not cause any additional actions to be run at
> startup.
>
> The core idea, similar to that of "type-based execution contexts" on
> the above wiki page, is to associate each top-level action with its
> own type.
I like the idea, similar to deriving(Typeable) in creating uniqueness.
Hopefully it can be made obvious somehow to code-readers unfamiliar with
it that the code is doing something unusual/controversial...
Isaac
(P.S. having read the Top_level_mutable_state page now, it is definitely
worth reading)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGWB+6HgcxvIWYTTURAlu0AKCR7eIm9NQjnpUt4PbYhaIJylWgPwCgnZul
JB4jszUNnd8+2HO+cR9LW7U=
=RxW5
-----END PGP SIGNATURE-----
More information about the Haskell-Cafe
mailing list