Click here to Skip to main content
15,910,358 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
Mike Hankey19-May-24 6:14
mveMike Hankey19-May-24 6:14 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
raddevus19-May-24 6:22
mvaraddevus19-May-24 6:22 
JokeRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
Nelek19-May-24 10:19
protectorNelek19-May-24 10:19 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
Mike Hankey19-May-24 10:41
mveMike Hankey19-May-24 10:41 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
trønderen19-May-24 11:58
trønderen19-May-24 11:58 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
Richard Andrew x6419-May-24 12:13
professionalRichard Andrew x6419-May-24 12:13 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
trønderen19-May-24 12:11
trønderen19-May-24 12:11 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
Ralf Quint20-May-24 10:14
Ralf Quint20-May-24 10:14 
Well, as I mentioned in another reply in this thread, the problem with using "with" is that is you have multiple records/objects with the same names for data (of the same TYPE) or methods/procedures/functions, you can not be sure which one might be called/referred to. So the use of "with" blocks should be deliberate and limited in scope, in order to prevent any ill effects, even if it is that your source won't compile because of the stringent type checking of Pascal. At the very least it requires you to find out which element of which record/object is actually referred to, which then needs to be fixed by adding at least one non-ambiguous prefix to the code line(s).
For example, if you have two records (A and B), which both have a element called C, a "with" block like

with A, B do
begin
C := 1;
C := 0;
end;


Not only looks wrong, but might actually yield unexpected results, if what you actually intended to write is

A.C := 1;
B.C := 0;


The same goes for calling methods of the same name in different objects, so something like

with A, B do
begin
C ("foo");
C ("bar");
end;


when actually is intended to be

A.C ("foo");
B.C ("bar")
;

With different types of parameters of the methods A.C() and B.C(), this won't compile, but if they happen to have the same parameter (or are parameter-less!), again, the outcome might now be what you have intended...
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
trønderen20-May-24 14:44
trønderen20-May-24 14:44 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
Ralf Quint20-May-24 16:48
Ralf Quint20-May-24 16:48 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
trønderen21-May-24 4:12
trønderen21-May-24 4:12 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
Ralf Quint21-May-24 6:18
Ralf Quint21-May-24 6:18 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
trønderen21-May-24 6:51
trønderen21-May-24 6:51 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
Peter Turtle19-May-24 21:47
professionalPeter Turtle19-May-24 21:47 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
0x01AA20-May-24 0:25
mve0x01AA20-May-24 0:25 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
Peter Turtle20-May-24 2:25
professionalPeter Turtle20-May-24 2:25 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
Al Gonzalez20-May-24 6:46
Al Gonzalez20-May-24 6:46 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
0x01AA20-May-24 7:06
mve0x01AA20-May-24 7:06 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
Ralf Quint20-May-24 8:41
Ralf Quint20-May-24 8:41 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
Ravi Bhavnani20-May-24 14:53
professionalRavi Bhavnani20-May-24 14:53 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
0x01AA21-May-24 8:26
mve0x01AA21-May-24 8:26 
GeneralRe: Fluent Api in Pascal, nothing earth-shattering ... Pin
jschell21-May-24 12:44
jschell21-May-24 12:44 
GeneralWordle 1,065 Pin
StarNamer@work18-May-24 13:32
professionalStarNamer@work18-May-24 13:32 
GeneralRe: Wordle 1,065 Pin
Sandeep Mewara18-May-24 17:09
mveSandeep Mewara18-May-24 17:09 
GeneralRe: Wordle 1,065 Pin
OriginalGriff18-May-24 20:01
mveOriginalGriff18-May-24 20:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.