Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Message from discussion Doubting Haskell
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jonathan Cast  
View profile  
 More options Feb 17 2008, 4:21 am
Newsgroups: fa.haskell
From: Jonathan Cast <jonathancc...@fastmail.fm>
Date: Sun, 17 Feb 2008 09:21:06 UTC
Local: Sun, Feb 17 2008 4:21 am
Subject: Re: [Haskell-cafe] Re: Doubting Haskell

On 17 Feb 2008, at 1:12 AM, Colin Paul Adams wrote:

>>>>>> "apfelmus" == apfelmus  <apfel...@quantentunnel.de> writes:

>     apfelmus> Colin Paul Adams wrote:
>>> Left? Right?

>>> Hardly descriptive terms. Sounds like a sinister language to
>>> me.

>     apfelmus> The mnemonics is that Right x is "right" in the sense of
>     apfelmus> correct. So, the error case has to be Left err .

> As I said, this is sinister

You do know what `sinister' means, no?

> (i.e. regarding left-handed people as
> evil).

Sheesh, it's just a mnemonic...

> And left is not the opposite of correct. That would be incorrect.

No, Left is the opposite of Right.  Right is the constructor modified  
by fmap (due to the design of Haskell type classes); therefore return  
= Right.  Therefore any computation in Either that is not the result  
of a return is an application of Left.

> Also, it is not clear to me that a failure to read a file (for
> instance) is incorrect behaviour.

Then don't think of Left as `incorrect behavior'.  Left isn't  
incorrect, or Parsec's parse function wouldn't return it on parse  
errors.

> If the file doesn't exist, then I
> think it ought to be considered correct behaviour to fail to read the
> file.

> So Success and Failure seem to be much better. Certainly they make the
> program far more readable to my eyes.

But the program succeeded in doing what I expected it to do when if  
failed...

jcc

Besides, these decisions were made 15 years ago, they're not going to  
change now...

_______________________________________________
Haskell-Cafe mailing list
Haskell-C...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.