# Re: Indentation vs. "end"s

**URL:** <https://www.ruby-forum.com/t/re-indentation-vs-end-s/100641>\
**Category:** Ruby\
**Created:** [February 3, 2006, 11:34am UTC](https://www.ruby-forum.com/t/re-indentation-vs-end-s/100641 "2006-02-03T11:34:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KroegerS\_Simon\_Sext](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/57b2e6/32.png) [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Post date:** [February 3, 2006, 11:34am UTC](https://www.ruby-forum.com/t/re-indentation-vs-end-s/100641/1 "2006-02-03T11:34:51Z")

</div>

> if (cond) {meth this; func that} #(2)

how about:

(puts ‘this’; puts ‘that’) if true

cheers

Simon

---

<div class="post-metadata">

**Author:** ![KroegerS\_Simon\_Sext](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/57b2e6/32.png) [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Post date:** [February 3, 2006, 3:02pm UTC](https://www.ruby-forum.com/t/re-indentation-vs-end-s/100641/2 "2006-02-03T15:02:50Z")

</div>

On 2/3/06, Kroeger, Simon (ext) [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > if (cond) {meth this; func that} #(2)
> 
> how about:
> 
> (puts ‘this’; puts ‘that’) if true

I’ll chime in and say that I also don’t like the “;;” idea.

I’ve always thought that parens could be used better, so I like  
Simon’s suggestion. In fact, if I were designing a language from  
scratch, I’d use parens differently for method calls.

Instead of

calculate\_average(19, sum(4, 7), 3)

I’d make it

calculate\_average 19 (sum 4 7) 3

Parens would only be used to group method names with arguments when  
there is more than one method call on the same line. Commas aren’t  
even necessary. Of course this is too drastic of a change to make to  
Ruby at this point.

---

<div class="post-metadata">

**Author:** ![KroegerS\_Simon\_Sext](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/57b2e6/32.png) [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Post date:** [February 3, 2006, 9:15pm UTC](https://www.ruby-forum.com/t/re-indentation-vs-end-s/100641/3 "2006-02-03T21:15:56Z")

</div>

> > if (cond) {meth this; func that} #(2)
> 
> how about:
> 
> (puts ‘this’; puts ‘that’) if true

Thanks for the suggestion. That may be a good  
solution for this particular case. But, how about

```
if condy then pet bush else bash him end #(3)

```

? Well, I think our main point is not how we can  
come up with a nice looking construct for each case,  
but what normal, regular constracts look like.

Regards,  
Ryo
