[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Defining variables - optionally required.

Ian Hobson

11/27/2003 6:58:00 PM

Hi all,

Forgive the suggestion if it has been done to death before I joined in.
I would like some facility to change the behaviour so that variables
have to be declared before use. It would catch many of (my) typos.

VB has set declare. I always use it if I can when forced to use that
language.

I recognise that it would have to be set on a per module or per class
basis, if for no better reason than the existing libraries would
otherwise be broken. The state of this switch would have to be
maintained in the class or module record for testing at run time.

It is therefore a language issue for Rite, not a flag for the
interpreter.

Two ideas.....

Class Sample < Object declare
var @foo
var @bar
def bodgit()
@oops = "Error" # error @oops not declared
end
end

Class Sample
#pragma declare
var @foo
etc

Comments. Ways to get the same effect now?

Regards

Ian
--
Ian - posting to a Newsgroup. Please remove everything to reply.
3 Answers

Giftzwerg

12/17/2009 9:49:00 AM

0

In article <18c260e8-d853-48e4-b0ec-
fd3199d4c56a@s20g2000yqd.googlegroups.com>, eddysterckx@hotmail.com
says...

> > Two points:
> >
> > (1)  It's impossible to discuss Iraq without having some squeaky retard
> > pop up and start bawling about how "Chimpy Bushitler Lied Us Into War
> > (TM)."  
>
> That's why killfiles were invented :)

True enough, but in the current context, the moment the word "Bush"
appears in the thread, any opportunity to discuss a military aspect of
Iraq or Afghanistan collapses into a worthless morass of lefty talking-
points.

It was the same with Vietnam for years. Only in the last decade or so
has it been possible to discuss the US war effort without a lot of
pointless blabber about "Johnson!" and "Nixon!"

> > Some (most) of us are just weary about going over the
> > same pointless ground, particularly since President Clodhopper has
> > changed exactly *none* of Bush's policies
>
> It's quite sad that guys who ooze integrity and honesty absolutely
> flatly refuse to get into politics and much that is wrong with the
> world today is due to the mediocre guys calling the shots.
>
> For instance : one wonders what a guy like Colin Powell would do if he
> ever could be persuaded to run for president.

I'm not as impressed by Powell as I might be. He was a little too
"finger in the wind" during both the original Gulf War and the post-9/11
regime change effort. And I always had the sneaking suspicion that he
was one of those generals who thought that the best way to have a strong
military was never to use it.



--
Giftzwerg
***
"A day after Sen. Joe Lieberman said he won't vote for the Democratic
health reform bill as currently written, a progressive public policy
blog is trying to oust his wife Hadassah as global ambassador for the
Susan G. Komen for the Cure breast cancer group."
- Ira Teinowitz
"What's the difference between the Mafia and a Hollywood Leftist? ?the
Mafia doesn't go after your family."
- Big Hollywood

Giftzwerg

12/17/2009 11:53:00 AM

0

In article <2d8bd635-53c7-42da-b2a4-e0d9baed0562
@d21g2000yqn.googlegroups.com>, eddysterckx@hotmail.com says...

> > True enough, but in the current context, the moment the word "Bush"
> > appears in the thread, any opportunity to discuss a military aspect of
> > Iraq or Afghanistan collapses into a worthless morass of lefty talking-
> > points.
> >
> > It was the same with Vietnam for years.  Only in the last decade or so
> > has it been possible to discuss the US war effort without a lot of
> > pointless blabber about "Johnson!" and "Nixon!"
>
> So it's a time/distance thing. Ok, we'll talk about the finer points
> of the diversionary tactics used at Fallujah in 2030 :)

Don't get me wrong, I don't mind talking about such things *now*. But
then I'm not interested in using a discussion of, say, the failure of
"Deep Strike" attack helicopter tactics in the 2003 invasion as a
jumping-off point for Yet Another Diatribe About Abu Ghraib(tm).

In other words, you can certainly have such a thread with *me*, but I
doubt you'll get very far without some hindsight-puffed idiotarian
bleating about, "The Sixteen Words."

> > I'm not as impressed by Powell as I might be.  He was a little too
> > "finger in the wind" during both the original Gulf War and the post-9/11
> > regime change effort.  And I always had the sneaking suspicion that he
> > was one of those generals who thought that the best way to have a strong
> > military was never to use it.
>
> .. or only when really necessary.
>
> "War should be the politics of last resort. And when we go to war, we
> should have a purpose that our people understand and support"

And *already* we teeter on the edge of the political abyss, as some
moonbat reads this quote, his fingers already twitching out on his
keyboard the opening stanzas of that dreary, oft-sung opera entitled,
"Bush's Illegal, Unnecessary War Against Peace Islam and Harmless,
Grandfatherly Saddam (Whose Hand Rumsfeld Once Shook!!!!)!"

--
Giftzwerg
***
"A day after Sen. Joe Lieberman said he won't vote for the Democratic
health reform bill as currently written, a progressive public policy
blog is trying to oust his wife Hadassah as global ambassador for the
Susan G. Komen for the Cure breast cancer group."
- Ira Teinowitz
"What's the difference between the Mafia and a Hollywood Leftist? ?the
Mafia doesn't go after your family."
- Big Hollywood

Ray O'Hara

12/17/2009 5:01:00 PM

0


<eddysterckx@hotmail.com> wrote in message
news:2d8bd635-53c7-42da-b2a4-e0d9baed0562@d21g2000yqn.googlegroups.com...
On 17 dec, 10:49, Giftzwerg <giftzwerg...@hotmail.com> wrote:
> In article <18c260e8-d853-48e4-b0ec-
> fd3199d4c...@s20g2000yqd.googlegroups.com>, eddyster...@hotmail.com
> says...
>
> > > Two points:
>
> > > (1) It's impossible to discuss Iraq without having some squeaky retard
> > > pop up and start bawling about how "Chimpy Bushitler Lied Us Into War
> > > (TM)."
>
> > That's why killfiles were invented :)
>
> True enough, but in the current context, the moment the word "Bush"
> appears in the thread, any opportunity to discuss a military aspect of
> Iraq or Afghanistan collapses into a worthless morass of lefty talking-
> points.
>
> It was the same with Vietnam for years. Only in the last decade or so
> has it been possible to discuss the US war effort without a lot of
> pointless blabber about "Johnson!" and "Nixon!"

So it's a time/distance thing. Ok, we'll talk about the finer points
of the diversionary tactics used at Fallujah in 2030 :)

> > > Some (most) of us are just weary about going over the
> > > same pointless ground, particularly since President Clodhopper has
> > > changed exactly *none* of Bush's policies
>
> > It's quite sad that guys who ooze integrity and honesty absolutely
> > flatly refuse to get into politics and much that is wrong with the
> > world today is due to the mediocre guys calling the shots.
>
> > For instance : one wonders what a guy like Colin Powell would do if he
> > ever could be persuaded to run for president.
>
> I'm not as impressed by Powell as I might be. He was a little too
> "finger in the wind" during both the original Gulf War and the post-9/11
> regime change effort. And I always had the sneaking suspicion that he
> was one of those generals who thought that the best way to have a strong
> military was never to use it.

... or only when really necessary.

"War should be the politics of last resort. And when we go to war, we
should have a purpose that our people understand and support"

Greetz,

Eddy Sterckx

========================================================================

its cute how the giftzwad and briarfruit always bitch about political
threads biut always include the political crap in every post they make.