Skip to main content
Discovery icon for Phobies Discord server

Phobies

1,265 Online
14,983 Members
# 💬︱general6 people

variable assignment vs instantiation

The discussion focuses on whether a programming statement primarily demonstrates object instantiation or variable assignment, concluding that it often involves both.

  • A statement like `ProfileInfo sectionInfo = ...` inherently involves variable assignment due to the `=` operator, regardless of what is on the right-hand side.
  • Object instantiation is the creation of an object, typically through a function call (e.g., `Instantiate` in Unity), which then gets assigned to a variable.
  • When both occur, the statement creates an object and assigns it to a variable, meaning it demonstrates both instantiation and assignment.
Summarized from recent messages, might be inaccurate

More conversations

Talk, Play, &
Hang Out

Find your space to hang out, discuss the latest updates with the party chat, and see who's down to join your next match.
Get App