[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Pythonic indentation (or: beating a dead horse)
From:       Ryo Furue <furue () hawaii ! edu>
Date:       2009-05-20 20:40:08
Message-ID: 37b5e25a-e221-4950-9241-ca5d847ee59d () k19g2000prh ! googlegroups ! com
[Download RAW message or body]

On May 20, 9:50 am, Gregory Brown <gregory.t.br...@gmail.com> wrote:
> On Wed, May 20, 2009 at 3:44 PM, Juan Zanos <juan_za...@talkhouse.com> wrote:
>
> > On May 20, 2009, at 2:51 PM, Rick DeNatale wrote:
>
> >> On Wed, May 20, 2009 at 2:35 PM, J Haas <Myrd...@gmail.com> wrote:
>
> >>> On May 20, 8:51 am, Rick DeNatale <rick.denat...@gmail.com> wrote:
>
> >>>> Seriously, if you measure things by avoiding extra keystrokes, get a
> >>>> better editor.  I value readability over parsimony of lexical items.
>
> >>> Cluttering up your code with "end" everywhere makes it less readable,
> >>> not more.
>
> >> Honestly, that's subjective. Some people prefer delimiters some don't.
>
> > Is it subjective?   Neither method is ambiguous.  So no problem there  But
> >  scrolling 16% more often?   That must have some cost to readability.
>
> If you break up code into more files, or use a folding editor, or use
> an editor that lets you jump to code by a method name, scrolling is a
> non-issue.
>
> Rick's point remains.  If this is an issue you're facing, get a better editor.

But, the amount of meaningful code displayed in a single screenshot
still suffers.  A screenful is a chunk of code
you can see without scrolling or jumping.  The more meaning it
contains, the better you understand the code (as long as the meaning
is cleanly laid out, of course).

The point, I think, is what you gain by having "end"s
and what you lose.  Since the gain is much smaller ON THE
PROGRAMMERS' PART than the loss, it's better NOT to have
"end"s.  The lack of "end"s may be a headache for compiler writers.
I don't know if it's the case.

I have the same opinion as the OP, from my tiny experience with
Haskell.  After only an hour or so of Haskell programming, I already
appreciated the blessing of not being forced to add
an extra line just to close a block.  An "end" line doesn't add any
meaning but takes up a line.

Regards,
Ryo


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic