The Dink Network

Reply to Re: Overthinking it

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
February 14th 2019, 07:50 PM
duck.gif
toof
Peasant He/Him
I disagree. 
Not bad... Not bad indeed. Not quite what I wanted, but it's close

The real question is what kind of problem this is trying to solve. If maximum age is a property of the Human class it should be implemented in the Human class and the Human class should have the responsibility to do the checking.

I don't really like quoting myself, I just love it
not related to any rational coding stuff

On a more serious note, although I still don't have any real example, suppose you have some enumerator that must determine on a specific place what age range should be allowed. So, instead of regular if you create a new object that handles whether the input is right or wrong. This is an overkill, sure, and there are much simpler ways to do it, but I was just curious.

By the way, how the duck did you deduced that Invoke() should take value as a parameter??? I was ready to smash my laptop at some point...

Edit:
plus, that whole:
ageRestriction: x => x <= 70 && x >= 0 in the constructor...
I'm kinda new to this... TDN is weird. Really, really weird.