Jump to content

Can I override private data?


Recommended Posts

The child constructor may or may not (often not) have the same creation requirements on the parent class data fields.

That's cool. Oppositely, I find it handy most of the time as the constructor has data inputs for parent data that I just wire in when calling it in the child.

Link to comment
Nope... almost never in fact. I'm not constructing a parent object, I'm constructing a child object, so calling a parent constructor seems out of place to me and makes the code more confusing (IMO.) The child constructor may or may not (often not) have the same creation requirements on the parent class data fields.

Daklu: Your opinion is probably shared by most LV users who haven't worked in other languages because LV doesn't have constructors with parameters. If it did, you would probably find yourself wanting to reuse your parent's constructors about as often as you want to use the Call Parent Node in any other method.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.