[erlang-questions] If you are homesick for object.selector

Robert Virding robert.virding@REDACTED
Mon Jan 28 14:18:38 CET 2013


There was an even better one mentioned in the test:

if(hasrating)
{
    thechkbox = currRating[0].parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.children(2).children(0).children(0)
    thechkbox.disabled = false;
}

:-)

----- Original Message -----
> From: "Garrett Smith" <g@REDACTED>
> To: "Robert Virding" <robert.virding@REDACTED>
> Cc: "Richard O'Keefe" <ok@REDACTED>, "erlang-questions Questions" <erlang-questions@REDACTED>
> Sent: Monday, 28 January, 2013 2:57:18 AM
> Subject: Re: [erlang-questions] If you are homesick for object.selector
> 
> On Sun, Jan 27, 2013 at 7:23 PM, Robert Virding
> <robert.virding@REDACTED> wrote:
> >
> > ----- Original Message -----
> >> From: "Richard O'Keefe" <ok@REDACTED>
> >>
> >> This is _so_ on-topic...
> >>
> >> http://thedailywtf.com/Articles/Ancestors.aspx
> >
> > Think how much more difficult to read it would have been if you had
> > to include the record names. :-)
> 
> For the benefit of those who didn't click the link, it contains this
> function in C#:
> 
> private void MouseMove(object sender, MouseEventArgs e)
> {
>    (sender as
>    PictureBox).Parent.Parent.Parent.Parent.Parent.GetType();
> }
> 
> After seeing that, I'm convinced Erlang record syntax is one the
> language's best features. If other languages had such a tax, this
> sort
> of thing would be held in check.
> 
> Call it a sin tax.
> 
> Get it?
> 
> Garrett
> 



More information about the erlang-questions mailing list