# Alias comma

**URL:** <https://www.ruby-forum.com/t/alias-comma/68090>\
**Category:** Ruby\
**Created:** [September 9, 2006, 1:51am UTC](https://www.ruby-forum.com/t/alias-comma/68090 "2006-09-09T01:51:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [September 9, 2006, 1:51am UTC](https://www.ruby-forum.com/t/alias-comma/68090/1 "2006-09-09T01:51:23Z")

</div>

Too small I think to post an actual RCR.

alias :this, :that  
=\> parse error, unexpected ‘,’

Can we get alias to handle a comma, please.

T.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [September 9, 2006, 2:01am UTC](https://www.ruby-forum.com/t/alias-comma/68090/2 "2006-09-09T02:01:24Z")

</div>

On Sep 8, 2006, at 7:47 PM, Trans wrote:

> Too small I think to post an actual RCR.
> 
> alias :this, :that  
> =\> parse error, unexpected ‘,’
> 
> Can we get alias to handle a comma, please.
> 
> T.

Use alias\_method ?

I like the lack of the comma (and the need for :). Makes it clear  
that it’s syntax.

alias this that

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [September 9, 2006, 2:17am UTC](https://www.ruby-forum.com/t/alias-comma/68090/3 "2006-09-09T02:17:25Z")

</div>

Logan C. wrote:

> > 
> 
> Use alias\_method ?
> 
> I like the lack of the comma (and the need for :). Makes it clear  
> that it’s syntax.
> 
> alias this that

That’s fine. I don’t care if also works without the comma. But it’s  
pointless that it can’t handle both. Then there’s no need for what’s  
“clear” or not, it just works.

T.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [September 9, 2006, 4:47am UTC](https://www.ruby-forum.com/t/alias-comma/68090/4 "2006-09-09T04:47:40Z")

</div>

Trans wrote:

/ …

> > I like the lack of the comma (and the need for :). Makes it clear  
> > that it’s syntax.
> > 
> > alias this that
> 
> That’s fine. I don’t care if also works without the comma. But it’s  
> pointless that it can’t handle both. Then there’s no need for what’s  
> “clear” or not, it just works.

If a comma were to be accepted in this case, someone would expect a list  
of  
indeterminate length to be syntactically correct (because that is how  
commas tend to be used). Then we would hear from those bitten by that  
“bug”.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [September 9, 2006, 6:53am UTC](https://www.ruby-forum.com/t/alias-comma/68090/5 "2006-09-09T06:53:50Z")

</div>

Paul L. wrote:

> > pointless that it can’t handle both. Then there’s no need for what’s  
> > “clear” or not, it just works.
> 
> If a comma were to be accepted in this case, someone would expect a list of  
> indeterminate length to be syntactically correct (because that is how  
> commas tend to be used). Then we would hear from those bitten by that  
> “bug”.

Why would anyone expect that? It requires two arguments. I also point  
out that it takes symbols just as well as literal names. Is anyone  
becoming confused b/c it doesn’t take a variable?

T.
