it's not a good idea

2011/5/3 femto <femto...@gmail.com>

> and
> $a=null;
> $a["db"]["config"]=1;
> //all of a sudden $a contains something, while in ruby it
> NullException: throws undefined method `[]' for nil:NilClass
> //in php is quite valid, and used everywhere, which is unfornate.
>
>
> On May 4, 9:22 am, femto <femto...@gmail.com> wrote:
> > Yes,it's self compiled,
> > why using _VARS, and not directly local_variables?
> > because php has some weird var logic,
> > like say
> > $a =1;
> > echo $GLOBALS["a"]; //this is 1, it automaticly affects entry in
> > $GLOBALS, and in the opposite direction,
> >
> > $GLOBALS["a"]=1;
> > echo $a; //now $a is 1, which is really unfornate.
> >
> > not to mention some indirect variable access.
> >
> > like
> > $a=1;
> > $c="a";
> > echo $$c; // this is 1, or
> > $$c = 2; //if affects $a,$GLOBALS["a"], which is unfornate,
> > all the ugliness is to handle php's weird behavior.
> >
> > On May 4, 9:15 am, Tim Shaffer <timshaf...@me.com> wrote:
> >
> >
> >
> >
> >
> >
> >
> > > That's probably the ugliest ruby code I've ever seen.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>


-- 
Rodrigo Mendonça
(62) 8567-3142

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to