Re: Readonly-to-outside variable

2015-04-28 Thread Baz via Digitalmars-d-learn
On Tuesday, 28 April 2015 at 19:30:06 UTC, tcak wrote: Is there any way to define a variable or an attribute as read-only without defining a getter function/method for it? Thoughts behind this question are: 1. For every reading, another function call process for CPU while it could directly rea

Re: Readonly-to-outside variable

2015-04-28 Thread Justin Whear via Digitalmars-d-learn
On Tue, 28 Apr 2015 19:30:04 +, tcak wrote: > Is there any way to define a variable or an attribute as read-only > without defining a getter function/method for it? > > Thoughts behind this question are: > 1. For every reading, another function call process for CPU while it > could directly r

Readonly-to-outside variable

2015-04-28 Thread tcak via Digitalmars-d-learn
Is there any way to define a variable or an attribute as read-only without defining a getter function/method for it? Thoughts behind this question are: 1. For every reading, another function call process for CPU while it could directly read the value from memory. 2. Repetition of same name fo