-
Notifications
You must be signed in to change notification settings - Fork 20
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
There is not array getter #52
Comments
What is the advantage of having a getter like that over accessing the field?
Would `Array()` work for you?
…---david ( 大卫)
Op 27 jun. 2017 13:46 schreef "Diego Javier Zea" <[email protected]>:
Now that array() was deprecated there is not an array getter. Could be
great to have a getter (getarray or similar) in order to not access
directly the array field.
Best regards,
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#52>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AFPh10YXQFZGtcQPH_cUKBVXG0Gimvq9ks5sIOupgaJpZM4OGg4I>
.
|
I believe that direct field access is discouraged in Julia, but I'm not sure. However, is good to have a stable getter in case that the internal array field change in the future. However, I'm moving my code to using |
I can't really look into the future that well. Personally I don't know what the julia idiom is for these kind of type-conversion functions. I thought things like n = NamedArray(...)
convert(Array, n) and Array(n) are similar. However, now that I think of it, this probably doesn't solve your problem, as these construct new copies of the array. There still is |
There's no problem. At the moment, I have defined my own getter to not write |
Now that
array()
was deprecated there is not an array getter. Could be great to have a getter (getarray
or similar) in order to not access directly thearray
field.Best regards,
The text was updated successfully, but these errors were encountered: