Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
WSA boo inconsistencie
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
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
 
mattmc3  
View profile  
 More options Jun 12 2007, 9:07 am
From: mattmc3 <matt...@gmail.com>
Date: Tue, 12 Jun 2007 06:07:37 -0700
Local: Tues, Jun 12 2007 9:07 am
Subject: WSA boo inconsistencie
I've noticed that when I'm developing with whitespace agnostic Boo,
the "if, elif, else" constructs require the "end" keyword only once -
at the very end like so:

#-=-=-=-=-=-=-=-=-=-=
        if (condition1):
            print '1st'
        elif (condition2):
            print '2nd'
        else:
            print 'Something else'
        end
#-=-=-=-=-=-=-=-=-=-=

However, with the "try, except, ensure" constructs, the "end" keyword
is required after every single block like so:

#-=-=-=-=-=-=-=-=-=-=
        try:
            raise DirectoryNotFoundException()
        end
        except e as ArgumentException:
            print 'ArgEx'
        end
        except e as FileNotFoundException:
            print 'FNF'
        end
        except e:
            print 'Other'
        end
        ensure:
            print 'The end'
        end
#-=-=-=-=-=-=-=-=-=-=

Why the inconsistency?  Was this done by design for some reason?  I'm
not sure I have a preference between the two methods - the first is
more ruby-ish and cleaner looking, and the second way clearly defines
the end of every block.  If you look at the other .NET languages, this
inconsistency doesn't exist - in C# a curly brace ends every block as
in the second example and in VB.NET the whole If and Try blocks are
terminated at the very end like the first example.  Either way is
fine, but it makes little sense to mix the idioms.


    Reply to author    Forward  
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.
Rodrigo B. de Oliveira  
View profile  
 More options Jun 12 2007, 9:15 am
From: "Rodrigo B. de Oliveira" <rodrigobam...@gmail.com>
Date: Tue, 12 Jun 2007 10:15:09 -0300
Local: Tues, Jun 12 2007 9:15 am
Subject: Re: WSA boo inconsistencie
On 6/12/07, mattmc3 <matt...@gmail.com> wrote:

> ...
> Why the inconsistency?

That's a bug.

    Reply to author    Forward  
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.
mattmc3  
View profile  
 More options Jun 12 2007, 9:47 am
From: mattmc3 <matt...@gmail.com>
Date: Tue, 12 Jun 2007 06:47:49 -0700
Local: Tues, Jun 12 2007 9:47 am
Subject: Re: WSA boo inconsistencie
Thanks.  I opened a ticket:

http://jira.codehaus.org/browse/BOO-836

On Jun 12, 9:15 am, "Rodrigo B. de Oliveira" <rodrigobam...@gmail.com>
wrote:


    Reply to author    Forward  
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.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google