can e do this?

View: New views
3 Messages — Rating Filter:   Alert me  

can e do this?

by John Carlson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In E, can you write something like this?

if (the next expression is true) then {
        the previous expression is false
}

How?  I would expect it to go into some kind of infinite loop, or  
throw an exception.

If E doesn't do it, which programming languages might do it?

Thanks,

John
_______________________________________________
e-lang mailing list
e-lang@...
http://www.eros-os.org/mailman/listinfo/e-lang

Re: can e do this?

by Mark Miller-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Apr 6, 2008 at 12:26 AM, John Carlson
<john.carlson3@...> wrote:
> In E, can you write something like this?
>
>  if (the next expression is true) then {
>         the previous expression is false
>  }
>
>  How?  I would expect it to go into some kind of infinite loop, or
>  throw an exception.

Not in this way. But the Datalock example in section 16.3 (p119) of my
thesis may be close enough. It becomes stuck, but neither with an
infinite loop nor with an exception.


--
Text by me above is hereby placed in the public domain

 Cheers,
 --MarkM
_______________________________________________
e-lang mailing list
e-lang@...
http://www.eros-os.org/mailman/listinfo/e-lang

Re: can e do this?

by Kevin Reid-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Apr 6, 2008, at 5:44, Mark Miller wrote:

> On Sun, Apr 6, 2008 at 12:26 AM, John Carlson  
> <john.carlson3@...> wrote:
>> In E, can you write something like this?
>>
>>  if (the next expression is true) then {
>>         the previous expression is false
>>  }
>>
>>  How?  I would expect it to go into some kind of infinite loop, or  
>> throw an exception.
>
> Not in this way. But the Datalock example in section 16.3 (p119) of  
> my thesis may be close enough. It becomes stuck, but neither with  
> an infinite loop nor with an exception.

This is older than MarkM's thesis, but easier to retrieve, and it's  
entirely about the particular problem:

http://www.erights.org/elang/concurrency/epimenides.html

--
Kevin Reid                            <http://homepage.mac.com/kpreid/>


_______________________________________________
e-lang mailing list
e-lang@...
http://www.eros-os.org/mailman/listinfo/e-lang
LightInTheBox - Buy quality products at wholesale price