On Monday 15 September 2014 07:55:20 Sven Barth wrote:
>
> As you can see the expression p^ is only evaluated once in the TestWith
> case while it's evaluated twice in the TestWithout one. So it's only
> minimally faster in this example (one less memory access), but if you
> use enough members of T
On 15.09.2014 03:06, Jim Leonard wrote:
On 9/13/2014 2:02 PM, Sven Barth wrote:
It has always worked in this manner. It's just for abbreviating typing,
not for combining properties. (and then the with-variant with multiple
elements is even more seldomly used than the single-element one...)
In
On 14.09.2014 18:05, Philippe wrote:
someone wrote about a better performance using "with". is that true?
even with a simple pointer as in:
with ptr^ do
begin
prop1 := ...
prop2 := ...
end;
which should be faster then
ptr^.prop1 := ...
ptr^.prop1 := ...
others wrote it is just usefull to
On 9/13/2014 2:02 PM, Sven Barth wrote:
It has always worked in this manner. It's just for abbreviating typing,
not for combining properties. (and then the with-variant with multiple
elements is even more seldomly used than the single-element one...)
In the Turbo Pascal days, WITH allowed for s
El 13/09/2014 17:34, Reinier Olislagers escribió:
(Earlier posted on forum)
See subject - I've posted this on stackoverflow
http://stackoverflow.com/questions/25719495/magickwand-conversion-to-tiffccitt-group-4-compression-gives-uncompressed-image
Link to example program + demo image is include
El 14/09/14 12:22, Jürgen Hestermann ha escrit:
>> -
>> d:=TreeRoot.SubDirs[Low(TreeRoot.SubDirs)]; // local var d
>> d^.DirLogged := true;
>> d^.DirHatFocus := false;
>> d^.SubDirsExpanded := true;
>> [...] --
someone wrote about a better performance using "with". is that true?
even with a simple pointer as in:
with ptr^ do
begin
prop1 := ...
prop2 := ...
end;
which should be faster then
ptr^.prop1 := ...
ptr^.prop1 := ...
others wrote it is just usefull to save writing
time ...
Em
El 14/09/14 17:20, Marco van de Voort ha escrit:
> In our previous episode, Martin Schreiber said:
>>> basically stopped using it.
>>
>> Why does Free Pascal not invent a safe "with" similar as the "with" of
>> MSElang?
>
> The primary question is of course if there is a need for a new construct
main problem seems to be using property whose name is common within
2 objects of the same "with" (or code within several "with")
could it
be controlled by a compiler option?
in that case compiler may return a
hint or warning or even an error depending of the choosen configuration
...
does
In our previous episode, Martin Schreiber said:
> > basically stopped using it.
>
> Why does Free Pascal not invent a safe "with" similar as the "with" of
> MSElang?
The primary question is of course if there is a need for a new construct at
all. I don't know MSELang, but many new languages try
On Sunday 14 September 2014 16:34:06 Marco van de Voort wrote:
>
> In the past I had the same opinion about with (WITHs evilness is
> exaggerated) as many others, but once I bumped my head a few times while
> using OO frameworks that were either not of my design or very large, I
> basically stopped
The reason why I made these comparisons to PL/1:
PL/1 was designed in the mid 60s, and Wirth of course knew about PL/1,
because he was at IBM at the time, and of course he was aware of the
problems
and pitfalls of PL/1. By including the WITH statement into PASCAL, he
probably
wanted to give the
Hi,
once I came to troubles with "with":
procedure TForm1.StringGrid1SelectEditor(Sender: TObject; aCol, aRow: Integer;
var Editor: TWinControl);
begin
with StringGrid1 do
begin
...
Editor:= ...;
...
end;
end;
because Editor is also public property of TStringGrid
Am 14.09.2014 15:39, schrieb Ched:
Hello All,
My two cents. The with statement is crystal clear for me. If newbies
prefer to use different manners to code the things, that are free to
do it. Using some kind of intermediate variable ? That's make to code
difficult to understand, need do open
In our previous episode, Ched said:
> So, they with statement has at least one aficionados: me. Was the with
> statement present if the first
> versions designed by Wirth himself ?
Yes, but the problems are mostly because of the scoping complexity that OO
extensions like classes add. Specially b
Ched wrote:
Hello All,
My two cents. The with statement is crystal clear for me. If newbies
prefer to use different manners to code the things, that are free to do
it. Using some kind of intermediate variable ? That's make to code
difficult to understand, need do open begin/end blocks in som
Hello All,
My two cents. The with statement is crystal clear for me. If newbies prefer to use different manners to
code the things, that are free to do it. Using some kind of intermediate variable ? That's make to code
difficult to understand, need do open begin/end blocks in some situations.
-1. !!!
I like "with" ... even it may give trouble times to
times!!! ... but I work alone on my programs ...
as always ... nothing
perfect! always should consider the conditions!!
Em 14.09.2014
09:30, Michael Thompson escreveu:
>> We have spend weeks (if not
months) off hunting
> We have spend weeks (if not months) off hunting down this kind of bugs.
> And its this kind of bug what showed up frequently in teams of
> programmers and that made us decide to ban the with statement as much
> as possible. Sooner or later the with stament is going to bite you, I
> just hope you
In our previous episode, J?rgen Hestermann said:
> > -
> > d:=TreeRoot.SubDirs[Low(TreeRoot.SubDirs)]; // local var d
> > d^.DirLogged := true;
> > d^.DirHatFocus := false;
> > d^.SubDirsExpanded := true;
> >
Jürgen Hestermann wrote:
>Do you also prepent all function and variable names
>with the unit name they come from?
>Do you realy always write
>
>LazUTF8.UTF8Delete
>instead of
>UTF8Delete
>?
>
>Nested WITH statements and the unit concept share the
>same problem but still the benefits outweigh the d
Jürgen Hestermann wrote:
>Realy? I love it. Consider these two varianst of code from one of my
>programs:
This is a simpler example than the one with with the 4 levels deep
(which can be quite a puzzle if there are multiple records containing
the same fieldname(s)). And yes you may love them but
Am 14.09.2014 09:36 schrieb "Graeme Geldenhuys" <
mailingli...@geldenhuys.co.uk>:
>
> On 2014-09-13 21:04, Mattias Gaertner wrote:
> >> What is the rationale for such a statement, ie using multliple
elements?
> > Less typing.
>
> ...and increases grey hair growth (due to lots more trouble debugging
Am 2014-09-14 12:08, schrieb Mattias Gaertner:
>> > All seasoned programmers know that and try to avoid the with statement.
> The quote is from Marius, not from me.
Correct. I deleted the wrong reference. ;-(
>> Realy? I love it. Consider these two varianst of code from one of my
programs:
>>
On Sun, 14 Sep 2014 11:58:22 +0200
Jürgen Hestermann wrote:
> Am 2014-09-13 22:31, schrieb Marius:
> > Mattias Gaertner wrote:
> > All seasoned programmers know that and try to avoid the with statement.
The quote is from Marius, not from me.
> Realy? I love it. Consider these two varianst of
Am 2014-09-13 22:31, schrieb Marius:
> Mattias Gaertner wrote:
> All seasoned programmers know that and try to avoid the with statement.
Realy? I love it. Consider these two varianst of code from one of my programs:
-
with TreeRoot.SubDirs
On 2014-09-13 21:31, Marius wrote:
> programmers know that and try to avoid the with statement.
+1
Regards,
- Graeme -
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
On 2014-09-13 21:04, Mattias Gaertner wrote:
>> What is the rationale for such a statement, ie using multliple elements?
> Less typing.
...and increases grey hair growth (due to lots more trouble debugging). :-)
Regards,
- Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free P
28 matches
Mail list logo