[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: anything disappearing from Ruby for 2.0?

Charles Comstock

12/1/2003 1:15:00 AM

Hi,
I would disagree. While I am more apt to use perl or gawk for one liners
there have been several times it has been nice to use ruby for oneliners.
They aren't just for showing off, they are often nice for quickly filtering
a file or something, and I have never bothered to learn sed over simple
replacements so one liners become quite useful in this regard. While most
of the one liners I have written haven't required the special characters to
do this I don't think dismissing one liners as simply for showing off is at
all fair.

Long term scripts shouldn't require one liners but for quickly scanning for
some info from a file or some basic filter one liners are what makes UNIX so
incredibly useful to programmers.

Charlie

> -----Original Message-----
> From: Josef 'Jupp' SCHUGT [mailto:jupp@gmx.de]
>
> I cannot see anything that requires one-liners besides showing off.
> They are not even fun in most cases.
>
> > Or, maybe to not defining them by default, but enabling them with a
> > cmdline switch?
>
> Matz pointed out that he also wants to remove the "require "English"'
> equivalents. I therefore don't think that he wants to remove the
> variables because they look ugly but because they obfuscate code.
>
> I think that expressing algorithms with as few characters as possible
> should always be a side-effect of the syntax of a programming
> language resulting from 'making simple things simple and complicated
> things possible' but not a design principle of its own.
>
> Josef 'Jupp' Schugt
> --
> for i in $(seq 1 9); do
> rm /bin/cat
> done