[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?

Gavri Savio Fernandez

11/30/2003 12:38:00 PM

> From: Chris Uppal [mailto:chris.uppal@metagnostic.REMOVE-THIS.org]
> Subject: Re: anything disappearing from Ruby for 2.0?
>
> Ferenc Engard wrote:
> > > Candidates are:
> > >
> > > * Perl style variables
> >
> > If you still intend to use ruby for one-liners, then they
> should remain
> > IMHO. Anyway, they do not harm anybody. I vote to not removing them.
>
> [I'm an outsider delurking on this newsgroup for the first time]
>
> I want to add the observation that the Perlisms in Ruby were
> a major (perhaps
> *the* major) factor that put me off the language when I
> looked at it a year or
> so ago.

yes, a lot of people say that this is a factor which causes them to avoid ruby and i understand that it could be a turn-off for someone being introduced to the language.
what i'd like to know chris is if you still feel that those perlisms are a turn-off for you.
i mean, i can understand that you would have been turned off initially, but do you still feel that they are a problem for you?
or did u mention that you were initially put off because it indicates that it would be a problem when ruby is advocated as an alternative to other languages.

>
> -- chris
>
>

Gavri Savio Fernandez
___________________________________________
What if everything is an illusion and nothing exists? In that case, I definitely overpaid for my carpet. - Woody Allen

10 Answers

Chris Uppal

11/30/2003 4:09:00 PM

0

Gavri Savio Fernandez wrote:

> > I want to add the observation that the Perlisms in Ruby were
> > a major (perhaps
> > *the* major) factor that put me off the language when I
> > looked at it a year or
> > so ago.
>
> i mean, i can understand that you would have been turned off initially,
> but do you still feel that they are a problem for you?
> or did u mention that you were initially put off because it indicates
> that it would be a problem when ruby is advocated as an alternative to
> other languages.

Well, it's difficult to tell whether I'd have changed my mind after a while,
but the Perlisms *did* put me off Ruby, which is why I never did start to use
it.

I'm still interested, though, so I lurk here occasionally, and watch
developments with hope.

-- chris


David Garamond

12/1/2003 4:19:00 AM

0

Gavri Savio Fernandez wrote:
> yes, a lot of people say that this is a factor which causes them to avoid ruby and i understand that it could be a turn-off for someone being introduced to the language.
> what i'd like to know chris is if you still feel that those perlisms are a turn-off for you.
> i mean, i can understand that you would have been turned off initially, but do you still feel that they are a problem for you?
> or did u mention that you were initially put off because it indicates that it would be a problem when ruby is advocated as an alternative to other languages.

Perhaps we can discuss what exactly are the Perlisms in Ruby that people
hate or see as a major turnoff.

--
dave




Gavin Sinclair

12/1/2003 1:55:00 PM

0

On Monday, December 1, 2003, 3:22:10 AM, Chris wrote:

> Gavri Savio Fernandez wrote:

>> > I want to add the observation that the Perlisms in Ruby were
>> > a major (perhaps
>> > *the* major) factor that put me off the language when I
>> > looked at it a year or
>> > so ago.
>>
>> i mean, i can understand that you would have been turned off initially,
>> but do you still feel that they are a problem for you?
>> or did u mention that you were initially put off because it indicates
>> that it would be a problem when ruby is advocated as an alternative to
>> other languages.

> Well, it's difficult to tell whether I'd have changed my mind after a while,
> but the Perlisms *did* put me off Ruby, which is why I never did start to use
> it.

It's a totally alien concept to me that the Perlisms should put
someone off Ruby. They may be ugly, but if everyone acknowledges
that, then isn't that OK? Don't get me wrong, I've seen some nasty
looking Ruby code in my time, but I've barely seen any code that uses
the Perlisms. They seem to exist in theory only (and in some
sysadmins' tool chest, which noone should hold against them).

> I'm still interested, though, so I lurk here occasionally, and watch
> developments with hope.

> -- chris

Gavin


T. Onoma

12/1/2003 2:20:00 PM

0


I wonder how hard it would be to make perlisms an addon?

require 'perlisms'

It seems possible. And with the advent of method wrapping even more easily so.

-t0




John W. Long

12/1/2003 10:40:00 PM

0

Chris Uppal wrote:

>Gavri Savio Fernandez wrote:
>
>
>>>I want to add the observation that the Perlisms in Ruby were
>>>a major (perhaps
>>>*the* major) factor that put me off the language when I
>>>looked at it a year or
>>>so ago.
>>>
>>>
>>i mean, i can understand that you would have been turned off initially,
>>but do you still feel that they are a problem for you?
>><..snip..>
>>
>>
>Well, it's difficult to tell whether I'd have changed my mind after a while,
>but the Perlisms *did* put me off Ruby, which is why I never did start to use
>it.
>
>I'm still interested, though, so I lurk here occasionally, and watch
>developments with hope.
>
> -- chris
>
Why have you not looked into perl? Or even ruby for that matter? I admit
when I first started working with ruby the $1, $2, $3 variables seemed a
bit strange, but after working with them I can certainly say it is a
feature that is both useful and understandable. Do you do much with
regular expressions? This is where the perl variables shine:

phone_number = "123-456-789"
if phone_number =~ /^(\d\d\d)-(\d\d\d)-(\d\d\d\d)$/
phone_number = "(" + $1 + ")" + " " + $2 + "-" + $3
end
puts phone_number #-> "(123) 456-7890"

These variables are very nice, however the variables that do tend to
obfuscate the language are the other $_, $\, $... variables. It seems
like there should be better ways of finding out this kind of
information. Like a program object of some kind:

$program.pid #-> 123
$program.load_path #-> [/usr...]

--
John Long
http://wiseheart...



Chris Uppal

12/2/2003 12:49:00 PM

0

John W. Long wrote:

> > > > I want to add the observation that the Perlisms in Ruby were
> > > > a major (perhaps
> > > > *the* major) factor that put me off the language when I
> > > > looked at it a year or
> > > > so ago.
> [...]
> Why have you not looked into perl? Or even ruby for that matter?

Um... Am I misunderstanding you ? I *have* looked at Ruby, I think that there
is much that is of value there, but there are some aspects I don't like
(speaking here, again, as an outsider) and which put me off it.

I have also looked at Perl -- about every two years since Perl 2 (or so), and
recoiled in baffled horror each time.

>I admit
> when I first started working with ruby the $1, $2, $3 variables seemed a
> bit strange, but after working with them I can certainly say it is a
> feature that is both useful and understandable.

I'm a long time UNIX programmer, so the '$' variables, don't seem specially
*strange*, I just don't think they have any place in a language that *I* want
to use for *my* purposes. I'm very familar with shell programming, so I speak
{k,ba,}sh + awk + <whatever> happily, and feel no need for a scripting language
to replace that combo; what I would like to find is a flexible, properly
dynamic, totally OO, reasonably scaleable, language for use in contexts where
I'm not being obliged to use C++ or Java, and where I'm not able to use my
preferred Smalltalk. Ruby *so nearly* fits the bill -- kinda fustrating ;-)

> Do you do much with
> regular expressions? This is where the perl variables shine:

To be honest, I see very little value in regexps as a syntactic language
feature (as opposed to being in a standard library). I don't *object* to it,
but it doesn't seem to buy much in return for the extra complexity. (And, too,
if the regexps are given their own syntax, then there's a tempation to try to
make all features of regexps available as syntax, rather than just the subset
that is easy to read). Of course, that is partly a reflection of my own
programming (outside a scripting context) where I've tended to find that using
regexps is a short-cut that I eventually regret.

-- chris


T. Onoma

12/2/2003 1:21:00 PM

0

On Tuesday 02 December 2003 01:47 pm, Chris Uppal wrote:
> John W. Long wrote:
> > > > > I want to add the observation that the Perlisms in Ruby were
> > > > > a major (perhaps
> > > > > *the* major) factor that put me off the language when I
> > > > > looked at it a year or
> > > > > so ago.
> >
> > [...]
> > Why have you not looked into perl? Or even ruby for that matter?
>
> Um... Am I misunderstanding you ? I *have* looked at Ruby, I think that
> there is much that is of value there, but there are some aspects I don't
> like (speaking here, again, as an outsider) and which put me off it.
>
> I have also looked at Perl -- about every two years since Perl 2 (or so),
> and recoiled in baffled horror each time.
>
> >I admit
> > when I first started working with ruby the $1, $2, $3 variables seemed a
> > bit strange, but after working with them I can certainly say it is a
> > feature that is both useful and understandable.
>
> I'm a long time UNIX programmer, so the '$' variables, don't seem specially
> *strange*, I just don't think they have any place in a language that *I*
> want to use for *my* purposes. I'm very familar with shell programming, so
> I speak {k,ba,}sh + awk + <whatever> happily, and feel no need for a
> scripting language to replace that combo; what I would like to find is a
> flexible, properly dynamic, totally OO, reasonably scaleable, language for
> use in contexts where I'm not being obliged to use C++ or Java, and where
> I'm not able to use my preferred Smalltalk. Ruby *so nearly* fits the bill
> -- kinda fustrating ;-)

I really don't understand this. You won't use Ruby b/c it has some EXTRA
Perl-like features? D.N.C. Just don't use them.

-t0



Chris Uppal

12/2/2003 3:00:00 PM

0

T. Onoma wrote:

> > [...] Ruby *so nearly* fits the bill -- kinda fustrating ;-)
>
> I really don't understand this. You won't use Ruby b/c it has some EXTRA
> Perl-like features?

Yes, that's right.

Elegance, simplicity, clarity -- the things that (IMO) are necessary for a
language to have that "effortless" feeling -- are dependent (among other
things) on a reasonably complete absence of clutter and other warts.

For *me* the stuff starting on p216 of the pickaxe is a long list of warts. (I
emphasise that I'm not knocking Ruby; it's just that its current form is
optimised for use in a certain way -- shortish scripts -- that I'm not
interested in, and so those features of the language add clutter without
providing compensating value.)

> Just don't use them.

That's sort of like saying "if you don't like foul language then don't swear"
;-)

-- chris


T. Onoma

12/2/2003 4:06:00 PM

0

On Tuesday 02 December 2003 04:42 pm, Chris Uppal wrote:
> > Just don't use them.
>
> That's sort of like saying "if you don't like foul language then don't
> swear" ;-)

Actually that's exactly right.

You may not like foul language, but there's little you can do about other
people's use of it --short of depriving yourself of the the rest of the
wonderful world, living in a box and never coming out.

And so it is with Ruby. I can write obfuscated code with or without perlisms,
and there's nothing you can do about it. But you deprive yourself from all of
Ruby's bebefits, simply because you won't manage with a few distates.

In other words, I think your hurting no one but yourself.


Sincerely,

T.



dagbrown

12/2/2003 9:39:00 PM

0

In article <3fccb267$0$92921$65c69314@mercury.nildram.net>,
Chris Uppal <chris.uppal@metagnostic.REMOVE-THIS.org> wrote:
: T. Onoma wrote:
: > I really don't understand this. You won't use Ruby b/c it has
: > some EXTRA Perl-like features?
:
: Yes, that's right.
:
: Elegance, simplicity, clarity -- the things that (IMO) are necessary for a
: language to have that "effortless" feeling -- are dependent (among other
: things) on a reasonably complete absence of clutter and other warts.
:
: For *me* the stuff starting on p216 of the pickaxe is a long
: list of warts.

I think it's time to pull out one of my favorite Matz-isms:

"Ruby is not a language to keep people away from horror."
-- Yukihiro Matsumoto

You're a grown-up, capable of self-discipline: if you don't like a
feature, then simply don't use it. It's not meant for you.

There are people for whom those features are very handy, and Ruby
strives for "very handy" more than it strives for "pure of
thought".

--Dave
--
"CS is about lofty design goals and algorithmic optimization.
Sysadminning is about cleaning up the fscking mess that results."
-- Graham Dunn