Skip to content

Reference vs expanded types #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
alshain opened this issue Sep 15, 2016 · 0 comments
Open

Reference vs expanded types #16

alshain opened this issue Sep 15, 2016 · 0 comments

Comments

@alshain
Copy link

alshain commented Sep 15, 2016

As the name would suggest a reference class sets itself apart in that it's attributes are references to other objects, either of classes defined by the developer or built-in classes such as STRING or REAL. As such, an object of a the reference type does not contain any actual values apart from addresses

That's not actually true. Reference vs expanded types are not about objects, they're about variables(fields/members/whatever) of reference or expanded types, these differ fundamentally, the objects, however, don't.

Reference types are free to contain expanded types, so an object of a reference type they will contain actual values if the developer specifies as such. Expanded types are free to contain reference types.

The difference is that variables will holy the value either directly, or they will simply hold a reference to a value. Traditionally, the two types are called reference and value types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant