On 27.09.2012 19:33, Marco van de Voort wrote:
In our previous episode, Marcos Douglas said:
- Records... "R" (?)
- Constants... UPPER_CASE? cSomething?
At least we would have a good and unique style.
IMHO, that's taking it too far. Usually there is only made a difference between
scopes (e.g
On Thu, Sep 27, 2012 at 2:43 PM, Michael Van Canneyt
wrote:
>
>
> On Thu, 27 Sep 2012, Marcos Douglas wrote:
>
>>>
>>> I hope not :-)
>>
>>
>> Of course the second is (a little) better.
>>
>> But, If you permits:
>> for i := StardValue to EndValue do
>> MyArray[i] := i;
>>
>> Now is more readable
On Thu, 27 Sep 2012, Marcos Douglas wrote:
I hope not :-)
Of course the second is (a little) better.
But, If you permits:
for i := StardValue to EndValue do
MyArray[i] := i;
Now is more readable. More verbose than the first but less verbose
than second. ;)
And it's not about the size
On Thu, Sep 27, 2012 at 2:26 PM, Michael Van Canneyt
wrote:
>
>
> On Thu, 27 Sep 2012, Marcos Douglas wrote:
>
However we can use "poor names" -- very difficult to happen a
collision -- to represent a variable like A, J, D... but I do not
think this is a good practice and you?
>>>
>
In our previous episode, Marcos Douglas said:
>
> - Records... "R" (?)
> - Constants... UPPER_CASE? cSomething?
>
> At least we would have a good and unique style.
IMHO, that's taking it too far. Usually there is only made a difference between
scopes (e.g. field and parameter, or global symbol a
On Thu, 27 Sep 2012, Marcos Douglas wrote:
However we can use "poor names" -- very difficult to happen a
collision -- to represent a variable like A, J, D... but I do not
think this is a good practice and you?
I do think this is good practice. I will seldom use variable names of more
than 2
On Thu, 27 Sep 2012 13:52:53 -0300
Marcos Douglas wrote:
> On Thu, Sep 27, 2012 at 12:34 PM, Graeme Geldenhuys
> wrote:
> > On 2012-09-27 16:08, michael.vancann...@wisa.be wrote:
> >>
> >> The compiler helps you by forcing you to use a prefix in objfpc mode in
> >> case you forgot.
> >
> > The c
On Thu, Sep 27, 2012 at 1:58 PM, Graeme Geldenhuys
wrote:
> On 2012-09-27 17:52, Marcos Douglas wrote:
>>
>> I agree that is much simpler... but why nobody, in another language,
>> do the same? Does not worth it? I do not know.
>
> Well, other languages have there own quirks like case sensitive
>
On Thu, Sep 27, 2012 at 1:55 PM, Graeme Geldenhuys
wrote:
> On 2012-09-27 17:46, Marcos Douglas wrote:
>>
>> This "feature" have the origin in a bug in compiler.
>
> Yeah, but it takes a human to debug such issues. The compiler might have
> no problem understanding complex scopes, but the same cou
On Thu, Sep 27, 2012 at 1:48 PM, Michael Van Canneyt
wrote:
>
>
> On Thu, 27 Sep 2012, Marcos Douglas wrote:
>
>> On Thu, Sep 27, 2012 at 12:08 PM, wrote:
>>>
>>>
>>>
>>> On Thu, 27 Sep 2012, Marcos Douglas wrote:
>>>
>
> Yes, it's always possible. In practice, I haven't seen this happen
On 2012-09-27 17:52, Marcos Douglas wrote:
>
> I agree that is much simpler... but why nobody, in another language,
> do the same? Does not worth it? I do not know.
Well, other languages have there own quirks like case sensitive
identifiers. Thank God, Object Pascal doesn't have that.
Just imagi
On 2012-09-27 17:46, Marcos Douglas wrote:
>
> This "feature" have the origin in a bug in compiler.
Yeah, but it takes a human to debug such issues. The compiler might have
no problem understanding complex scopes, but the same could not always
be said for programmers.
My code was affected by thi
On Thu, Sep 27, 2012 at 12:34 PM, Graeme Geldenhuys
wrote:
> On 2012-09-27 16:08, michael.vancann...@wisa.be wrote:
>>
>> The compiler helps you by forcing you to use a prefix in objfpc mode in
>> case you forgot.
>
> The change in FPC mode objfpc was definitely a good thing. I had code
> where a
On Thu, 27 Sep 2012, Marcos Douglas wrote:
On Thu, Sep 27, 2012 at 12:08 PM, wrote:
On Thu, 27 Sep 2012, Marcos Douglas wrote:
Yes, it's always possible. In practice, I haven't seen this happen a
single
time in the 10+ years that the compiler has had this feature. That
doesn't
mean tha
On Thu, Sep 27, 2012 at 12:26 PM, Graeme Geldenhuys
wrote:
> On 2012-09-27 15:48, Marcos Douglas wrote:
>> problem, IMHO, is that I can't choose when we talk about local
>> variables.
>
> Just like there is a coding style (not language rule) that classes start
> with the "T" prefix, and class fiel
On Thu, Sep 27, 2012 at 12:08 PM, wrote:
>
>
> On Thu, 27 Sep 2012, Marcos Douglas wrote:
>
>>>
>>> Yes, it's always possible. In practice, I haven't seen this happen a
>>> single
>>> time in the 10+ years that the compiler has had this feature. That
>>> doesn't
>>> mean that it's impossible, but
On 2012-09-27 16:08, michael.vancann...@wisa.be wrote:
>
> The compiler helps you by forcing you to use a prefix in objfpc mode in
> case you forgot.
The change in FPC mode objfpc was definitely a good thing. I had code
where a class had an Index property, and other methods of that class had
an I
On 2012-09-27 15:48, Marcos Douglas wrote:
> problem, IMHO, is that I can't choose when we talk about local
> variables.
Just like there is a coding style (not language rule) that classes start
with the "T" prefix, and class field variable start with a "F" prefix, I
applied that same coding style
On 2012-09-27 15:30, michael.vancann...@wisa.be wrote:
> For me, it has become second nature never ever to have a variable with the
> same name as a property, even in Delphi.
+1
G.
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.
On Thu, 27 Sep 2012, Marcos Douglas wrote:
Yes, it's always possible. In practice, I haven't seen this happen a single
time in the 10+ years that the compiler has had this feature. That doesn't
mean that it's impossible, but it's another factor in the "good to have"
versus "causes more harm t
On Thu, Sep 27, 2012 at 11:53 AM, wrote:
>
>
> On Thu, 27 Sep 2012, Marcos Douglas wrote:
>
>>
>> But this is a programmer's choice, ie, using or not the Self. The
>> problem, IMHO, is that I can't choose when we talk about local
>> variables.
>
>
> You can: Use delphi mode.
As I said, I know th
On Thu, Sep 27, 2012 at 11:33 AM, Jonas Maebe wrote:
>
> On 27 Sep 2012, at 16:18, Marcos Douglas wrote:
>
>> On Thu, Sep 27, 2012 at 11:01 AM, Jonas Maebe
>> wrote:
>>>
>>>
>>> Yes, but the human brain is very good at confusing such things, and it's
>>> very easy to accidentally assign something
On Thu, 27 Sep 2012, Marcos Douglas wrote:
But this is a programmer's choice, ie, using or not the Self. The
problem, IMHO, is that I can't choose when we talk about local
variables.
You can: Use delphi mode.
Michael.
___
fpc-devel maillist - f
On Thu, Sep 27, 2012 at 11:30 AM, wrote:
>
>
> On Thu, 27 Sep 2012, Marcos Douglas wrote:
>
>> On Thu, Sep 27, 2012 at 11:01 AM, Jonas Maebe
>> wrote:
>>>
>>>
>>> On 27 Sep 2012, at 15:51, Marcos Douglas wrote:
>>>
>>> What is the advantages to the compiler return the error bellow?
>>> ERROR: un
On 27 Sep 2012, at 16:18, Marcos Douglas wrote:
On Thu, Sep 27, 2012 at 11:01 AM, Jonas Maebe > wrote:
Yes, but the human brain is very good at confusing such things, and
it's
very easy to accidentally assign something to a local variable
instead of to
a field.
Only Pascal uses that way
On Thu, 27 Sep 2012, Marcos Douglas wrote:
On Thu, Sep 27, 2012 at 11:01 AM, Jonas Maebe wrote:
On 27 Sep 2012, at 15:51, Marcos Douglas wrote:
What is the advantages to the compiler return the error bellow?
ERROR: unit1.pas(31,3) Error: Duplicate identifier "FooVar"
Why the compiler do n
On Thu, Sep 27, 2012 at 11:01 AM, Jonas Maebe wrote:
>
> On 27 Sep 2012, at 15:51, Marcos Douglas wrote:
>
> What is the advantages to the compiler return the error bellow?
> ERROR: unit1.pas(31,3) Error: Duplicate identifier "FooVar"
>
> Why the compiler do not respect the scope, ie, the local va
On 27 Sep 2012, at 15:51, Marcos Douglas wrote:
What is the advantages to the compiler return the error bellow?
ERROR: unit1.pas(31,3) Error: Duplicate identifier "FooVar"
Why the compiler do not respect the scope, ie, the local variable
should have the preference, I'm not right?
Yes, but th
28 matches
Mail list logo