Patrick PREMARTIN 153 Posted Friday at 04:38 PM 5 minutes ago, Attila Kovacs said: By the way, is the bookmarks plugin coming to 13 later? Bookmarks, Navigator and the multi threading debugger extension from Parnassus should arrive on GetIt in a few days. 1 Share this post Link to post
Anders Melander 2104 Posted Friday at 06:19 PM 1 hour ago, Patrick PREMARTIN said: The reason is simple : it's disabled for Delphi (but can be used by IDE plugins or for next update or release) It should have been hidden for Delphi. Having it visible but but disabled, with no way to make it enabled, is just confusing; Poor UI design. https://learn.microsoft.com/en-us/windows/win32/uxguide/win-dialog-box#disabling-or-removing-controls-vs-giving-error-messages 2 Share this post Link to post
David Heffernan 2475 Posted Friday at 10:24 PM 7 hours ago, dummzeuch said: Autoformat has one huge advantage (apart from laziness, of course): It catches wrong indentations that suggest wrong code flows: if Condition then doX; doY; doOtherStuff; I mean just never ever ever use single statement, always use compound and it's a non problem. Share this post Link to post
Mark- 38 Posted Saturday at 01:18 AM 10 hours ago, david berneda said: 😂 I can quickly identify code not written by me when I see a minor formatting difference. Even 20 years later 😂 Ditto. I was deposed years ago and the attorney was asking me questions about the code. He had a printout. He got to one part and I said that is not mine. He asked how did I know. I showed him all the code that was mine by the style of formatting I use. That ended the code questions. 1 Share this post Link to post
Attila Kovacs 688 Posted Saturday at 06:21 AM 5 hours ago, Mark- said: Ditto. I was deposed years ago and the attorney was asking me questions about the code. He had a printout. He got to one part and I said that is not mine. He asked how did I know. I showed him all the code that was mine by the style of formatting I use. That ended the code questions. versioning/blame 🙂 Share this post Link to post
Lars Fosdal 1911 Posted Saturday at 06:54 AM I spent nearly a decade undoing my built-in left-pinky-shift uppercase reserved word habit, imbued during the pre-syntax-coloring years 🤣 However, I won't give up my if/then/else formatting, and I haven't found a formatter able to replicate it. So, I guess I don't miss that formatter. 3 Share this post Link to post
dummzeuch 1707 Posted Saturday at 07:25 AM 8 hours ago, David Heffernan said: I mean just never ever ever use single statement, always use compound and it's a non problem. So if you get some source code to work on, you really go through it and add begin/end for every code block? I for one are definitely to lazy for that. 2 Share this post Link to post
dummzeuch 1707 Posted Saturday at 07:28 AM 32 minutes ago, Lars Fosdal said: 🤣 However, I won't give up my if/then/else formatting, and I haven't found a formatter able to replicate it. What kind of strange formatting might that be? 2 Share this post Link to post
Uwe Raabe 2197 Posted Saturday at 08:09 AM 40 minutes ago, dummzeuch said: What kind of strange formatting might that be? I was just about asking the same Share this post Link to post
Dalija Prasnikar 1535 Posted Saturday at 09:13 AM (edited) 1 hour ago, dummzeuch said: So if you get some source code to work on, you really go through it and add begin/end for every code block? I for one are definitely to lazy for that. And then you write things like this https://quality.embarcadero.com/browse/RSP-23924 function TBaseFoo.BrokenFoo: IFoo; var LOwner: TComponent; begin Result := nil; if Supports(Self, IFoo) then Result := Self as IFoo else LOwner := Owner; // if block execution will continue here !!!! while LOwner <> nil do begin if Supports(LOwner, IFoo) then begin Result := LOwner as IFoo; Break; end else LOwner := LOwner.Owner; end; end; Edited Saturday at 09:14 AM by Dalija Prasnikar 1 Share this post Link to post
David Heffernan 2475 Posted Saturday at 11:29 AM 4 hours ago, dummzeuch said: So if you get some source code to work on, you really go through it and add begin/end for every code block? I for one are definitely to lazy for that. I don't "get some source code to work on". It's all our own code and we all follow the house style, obviously. Share this post Link to post
dummzeuch 1707 Posted Saturday at 01:50 PM 2 hours ago, David Heffernan said: I don't "get some source code to work on". It's all our own code and we all follow the house style, obviously. So you are a lucky one. For me it's also mostly our own code, but some of it is so ancient that it did not follow the our current style. Of course that's only at work, my hobby projects are a different story all together: Many different styles from many different authors. Some even from past me. Share this post Link to post
Anders Melander 2104 Posted Saturday at 06:55 PM 9 hours ago, Dalija Prasnikar said: function TBaseFoo.BrokenFoo: IFoo; var LOwner: TComponent; begin Result := nil; if Supports(Self, IFoo) then Result := Self as IFoo else LOwner := Owner; // if block execution will continue here !!!! while LOwner <> nil do begin if Supports(LOwner, IFoo) then begin Result := LOwner as IFoo; Break; end else LOwner := LOwner.Owner; end; end; I know the actual implementation wasn't the point, but I just can't leave code like that unchallenged. It haunts me. function TBaseFoo.BetterFoo: IFoo; var Item: TComponent; begin Result := nil; Item := Self; while (Item <> nil) and (not Supports(Item, IFoo, Result)) do Item := Item.Owner; end; 1 Share this post Link to post
corneliusdavid 259 Posted yesterday at 04:47 AM 16 hours ago, David Heffernan said: I don't "get some source code to work on". It's all our own code and we all follow the house style, obviously. I know at least part of this was sarcastic but just in case anyone really believes that, know that some (many?) of us have been plopped into projects written by others with either little coding skill, no sense of style, or hasn’t been warned about the maniac that might have to maintain their code. I’m nearing three years at a job where I’m maintaining and migrating hundreds of old Delphi 5 accounting programs up to Delphi 12. The millions of lines code are strangely formatted, and has been worked on by dozens of individuals who, at one time, called themselves programmers; there are dated comments back to 1997! I use the code formatter every day. 1 Share this post Link to post
David Heffernan 2475 Posted yesterday at 07:32 AM 2 hours ago, corneliusdavid said: I know at least part of this was sarcastic but just in case anyone really believes that Well, no sarcasm and this is true. Because we are a software house developing our own product. Obviously other developers work in different settings. Share this post Link to post
Dalija Prasnikar 1535 Posted yesterday at 11:58 AM 17 hours ago, Anders Melander said: I know the actual implementation wasn't the point, but I just can't leave code like that unchallenged. It haunts me. I hear you... Share this post Link to post
Mark NZ 13 Posted yesterday at 06:38 PM On 9/12/2025 at 5:47 AM, mvanrijnen said: People tried the codecompletion. error insight etc, with a big project? Yup, LSP still crashes frequently. Possibly works a bit better before it crashes. Share this post Link to post
Mark NZ 13 Posted yesterday at 06:49 PM On 9/13/2025 at 12:34 AM, dwrbudr said: No refactoring is a showstopper for me to use Delphi 13.0. Big dissapointment. The refactoring removal is actually the biggest benefit of Dephi 13.0 for me so far. It only ever worked on a trivially small project and on our large projects just moving the mouse past the menu option not fast enough caused minute+ freezes, that was VERY frustrating for me when debugging and trying to jump to statement. 2 Share this post Link to post
Anders Melander 2104 Posted yesterday at 07:47 PM 55 minutes ago, Mark NZ said: just moving the mouse past the menu option not fast enough caused minute+ freezes, that was VERY frustrating for me when debugging and trying to jump to statement. I share that experience - but it was an optional component so you could have just chosen not to install it. Share this post Link to post
pyscripter 836 Posted 22 hours ago I must say, that an IDE without quality refactoring support does not sound good. The LSP protocol includes refactoring, and I think that the best way forward is to implement it via the LSP server, freeing the IDE itself from such tasks. But first existing LSP issues need to be ironed out. Share this post Link to post
dwrbudr 10 Posted 17 hours ago 7 hours ago, Mark NZ said: The refactoring removal is actually the biggest benefit of Dephi 13.0 for me so far. It only ever worked on a trivially small project and on our large projects just moving the mouse past the menu option not fast enough caused minute+ freezes, that was VERY frustrating for me when debugging and trying to jump to statement. Yes, the freeze is there, but refactoring has worked OK for me. I suppose 12.3 will have to stay forever on my PC just for refactoring. formatter.exe can be used via CMD since we have very strict coding guideline and code reviews before pull requests. Share this post Link to post
Lars Fosdal 1911 Posted 13 hours ago On 9/13/2025 at 9:28 AM, dummzeuch said: What kind of strange formatting might that be? On 9/13/2025 at 10:09 AM, Uwe Raabe said: I was just about asking the same I described it years back in this post. Writing Readable Code - Formatting and Comments. (it seems that the import to Wordpress didn't do the code blocks the best way... I'll see if I can fix that when I get the time. Basically, it is making things as readable as possible, and avoiding bunching code up tight together. Readbility should come first. For instance, I like a line break immediately after conditions, and identation for single statements. Examples: // if then / if then else single statements if Condition then Action; if Condition then Action else Alternative; if Condition // sometimes I use these variation - yeah I know, not 100% consistant. then Action else begin Alternative; end; if Condition then begin Action; end else Alternative; if Condition then begin Action; end else begin Alternative; end; // for / while for var x in Collection do Something(x); for var x in Collection do begin Something(x); end; while Condition do Action; while Condition do begin Action; end; The purpose is to really hi-lite the if/then/else on separate lines, using indentation for breaking the visual pattern when only using simple statements and not blocks. For conditions, I also tend to group/break those to try to improve readability, but here it is very difficult to be consistant. I'd recommend trying to write them like you write other statements - optimizing for clarity, rather than condensing code as much as possibe. Share this post Link to post
dummzeuch 1707 Posted 13 hours ago 12 hours ago, Mark NZ said: The refactoring removal is actually the biggest benefit of Dephi 13.0 for me so far. It only ever worked on a trivially small project and on our large projects just moving the mouse past the menu option not fast enough caused minute+ freezes, that was VERY frustrating for me when debugging and trying to jump to statement. These refactoring methods worked for me quite well, most of the time: Declare a variable or field Rename an identifier (that one always worked fine within a single unit and most of the time even for the whole project) Extract selected code to a method I have been using them since they were introduce in Delphi 2007 and I already miss them. Share this post Link to post
dummzeuch 1707 Posted 12 hours ago 40 minutes ago, Lars Fosdal said: Examples: // if then / if then else single statements if Condition then Action; if Condition then Action else Alternative; if Condition // sometimes I use these variation - yeah I know, not 100% consistant. then Action else begin Alternative; end; if Condition then begin Action; end else Alternative; if Condition then begin Action; end else begin Alternative; end; // for / while for var x in Collection do Something(x); for var x in Collection do begin Something(x); end; while Condition do Action; while Condition do begin Action; end; The purpose is to really hi-lite the if/then/else on separate lines, using indentation for breaking the visual pattern when only using simple statements and not blocks. Hm, interesting. Some of it could be easily done with the GExperts code formatter, but not all of it. Care to write a feature request? (I'm not promising anything! But having a formal feature request would definitely increase the likelihood of somebody implementing it.) Share this post Link to post
Lars Fosdal 1911 Posted 12 hours ago (edited) 25 minutes ago, dummzeuch said: Care to write a feature request? I can do that. I forgot to mention that I also prefer a blank line before and after the conditional blocks, more or less the way it looks in the above example. Edit: @dummzeuch I can't enter a feature request 😢 SourceForge will not let me in if I don't accept their cookie policies - which is unacceptable. Edit 2: Hmm... maybe there is a way around. Edit 3: Done. https://sourceforge.net/p/gexperts/feature-requests/200/ Edited 12 hours ago by Lars Fosdal SourceForge cookie fight 1 Share this post Link to post