emacs-devel
[Top][All Lists]
Advanced

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

Re: Kickstarter for Emacs


From: Phil Hagelberg
Subject: Re: Kickstarter for Emacs
Date: Wed, 25 Apr 2012 16:33:52 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>> The problem still remains: what would be the benefit?
>> I must confess this is difficult for me to express, simply because
>> it's something I've taken for granted for so long; it's like being
>> asked why I like garbage collection. Anyhow, the most obvious benefit
>> would be that you have a chance at writing code that you know will
>> function correctly while run concurrently. =)
>
> I'm an academic working in functional programming and type systems, so
> you don't have to convince me of the general virtues of
> side-effect-free code.
>
> So my question is specifically in the context of Emacs where you need to
> balance the theoretical benefits against the downsides (mostly
> incompatibilities and efforts that could be spent elsewhere).

I guess the main specific benefit (beyond the general "easier to write
functions you know are correct") is that once you introduce concurrency,
you will need a way to share data between different threads. Shared
mutable state is very very difficult to get right; in order to avoid
race conditions you must construct complex, error-prone, and
non-composable locking strategies and adhere to them rigidly.

Another option of course would be to force all cross-thread
communication to go through channels that cause data to be copied, but
this would probably feel unnatural and would be difficult to enforce in
addition to being more expensive.

The benefit in Emacs as it is today might not be too clear, but I
believe this to be an important step to take as we move into the
concurrent world.

-Phil



reply via email to

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