Stano 146 Posted yesterday at 08:44 AM 1 hour ago, dummzeuch said: 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. It's been mentioned several times. These things are handled by MMX. And good. 1 Share this post Link to post
Anders Melander 2111 Posted yesterday at 09:10 AM 2 hours ago, Lars Fosdal said: Basically, it is making things as readable as possible Kudos on managing to avoid the one style we can all read. 1 hour ago, dummzeuch said: Rename an identifier (that one always worked fine within a single unit and most of the time even for the whole project) Rename across units have never worked for anything but the most trivial code (okay, maybe in the first couple of versions). And without that it's useless. I can manage rename in a single unit on my own, without the help of refactoring (but of course I wouldn't mind it). 16 minutes ago, Stano said: It's been mentioned several times. These things are handled by MMX. And good. MMX doesn't have rename refactoring. I haven't got it installed anymore, so I can't verify, but every time I install it it's because I need rename refactoring and every time I discover that it can't do it properly and uninstall again. What you are referring to as "rename refactoring" is just a text search/replace in MMX. 1 Share this post Link to post
Lars Fosdal 1920 Posted yesterday at 09:12 AM Just now, Anders Melander said: Kudos on managing to avoid the one style we can all read. Thanks. I just don't find it very readable - just old and established. Share this post Link to post
GabrielMoraru 44 Posted yesterday at 10:52 AM (edited) On 9/10/2025 at 6:50 PM, PeterPanettone said: I like the NameOf(T) compiler (magic) function. Attila: > it only took 10 years Yes, it should have been done 10 years ago in order to be adopted by now. Now if I use it in my public libraries, people will not be able to compile my code unless they have Delphi 13. This is always the catch with new language features... Anyway, I love it! Too bad it was not introduced in Delphi 1! Today is it not as grandiose/necessary, because now we have tools like madShi madExpert (and the other one that I don't want to say its name here)... but still cool to have it! _____________________________________________________________________________ Steve Maughan > I assume Delphi 13 can be installed alongside 12.3. Yes. It works. I just put a tutorial on my website on how to port the registry settings from D12 to D13 (actually it works with all editions). _____________________________________________________________________________ On 9/12/2025 at 8:42 AM, Attila Kovacs said: One step forward, ten steps back. corneliusdavid > That's a bit of an exaggerated statement. I don't use that feature (I even disabled the dangerous Ctrl+D shortcut) but I do understand Attila. Each person uses the IDE/RTL in a certain way. What for one is irrelevant, for others is gold. Second: It is sad (at least) to have features removed (instead of added) from your IDE 😞 ___________________________________________________________________ Oboba: >So the Refactor menu is greyed out, why is that? I know it didn't work properly sometimes, even basic "Rename" refactoring. I see above that it was removed with the Modelling support, then why leave the menu item greyed out and not remove it completely then? Also see: https://embt.atlassian.net/servicedesk/customer/portal/3/RSB-911 ___________________________________________________________________ Mark NZ >The refactoring removal is actually the biggest benefit of Delphi 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. Same here. Refactoring rarely worked. BUT Anders is right " but it was an optional component so you could have just chosen not to install it". I hard it worked for some... ___________________________________________________________________ Lars F > I described it years back in this post. Writing Readable Code - Formatting and Comments. I disagree with most of your proposed formatting examples (but I have nothing personal with you - big smiley face ). We are all different human beings. You will never make everyone agree on what is the best formatting style. You can enforce it, as many companies do, but you will not convince all people agree with it. I have been in places where a very very specific (non Embarcadero) formatting style was enforced. Your commit was simply rejected if it was not tightly formatted. On the other hand the company had no rules enforced on programming style and documentation. Actually the documentation was discouraged (because "the code will change and we will forget to update the documentation"). And the code was as peppered with case-without-else, App.ProcessMessage, try/except as a well seasoned stake on the grill. I think, before discussing formatting, we should deal with the safety rules. 🙂 - I have seen try/except so often abused that I started lately to wish Delphi had no such language feature. Or make it expensive: every time you compile a line of code like this, pay 10 cents! Or allow the developer to use it only if he has a Delphi certificate. 🙂 Or, maybe the compiler can be made to detect empty try/except cases and refuse to compile... A warning would not be enough because I have also seen projects where developers abandoned the "Messages" window because it had too many hints and warnings. Edited yesterday at 11:45 AM by GabrielMoraru 1 Share this post Link to post
Attila Kovacs 692 Posted yesterday at 11:27 AM 28 minutes ago, GabrielMoraru said: Yes, it should have been done 10 years ago in order to be adopted by now. The request was created in 2015 by Horacio, that was what I was referring to. 2 Share this post Link to post
GabrielMoraru 44 Posted 23 hours ago (edited) I cannot find "Delphi Advisor Wizard Upgrade" on web GetIt. Does anyone know anything about it? Edited 23 hours ago by GabrielMoraru Share this post Link to post
Dalija Prasnikar 1544 Posted 23 hours ago 3 hours ago, Lars Fosdal said: Thanks. I just don't find it very readable - just old and established. Beauty is in the eye of the beholder. I literally get dizzy trying to read your code formatting. Even with braces I very much dislike any style besides Allman, and in Pascal, begin and end absolutely must be on the same vertical line for me. 4 Share this post Link to post
Anders Melander 2111 Posted 22 hours ago 2 hours ago, GabrielMoraru said: I just put a tutorial on my website on how to port the registry settings from D12 to D13 (actually it works with all editions). Is there any reason why you aren't just using the bundled migration tool (apart from the (unsurprisingly) horrible usability of it)? 2 Share this post Link to post
Lars Fosdal 1920 Posted 22 hours ago 1 hour ago, Dalija Prasnikar said: Beauty is in the eye of the beholder. That is indeed true. Share this post Link to post
Lars Fosdal 1920 Posted 21 hours ago 2 hours ago, GabrielMoraru said: You will never make everyone agree on what is the best formatting style. True. But I would love a formatter flexible enough to allow it to transmogrify code according to my liking. Currently, there are none, hence I have to do without. 1 1 Share this post Link to post
dummzeuch 1714 Posted 20 hours ago 6 hours ago, Stano said: It's been mentioned several times. These things are handled by MMX. And good. I tried MMX but it's a lot less convenient than the integrated refactoring. I don't remember the specifics, but I think e.g. you have to enter / select the type for a new variable / field rather than have the tool infer it from what is assigned to it. 1 Share this post Link to post
David Heffernan 2480 Posted 20 hours ago The tooling in RAD Studio is more than a decade behind the many other IDEs around. It's feeble that we are making excuses for it not being able to do basic refactorings. 2 1 Share this post Link to post
GabrielMoraru 44 Posted 17 hours ago (edited) 2 hours ago, David Heffernan said: The tooling in RAD Studio is more than a decade behind the many other IDEs around. That's one of the top items on my "Delphi wish list": * Bring fresh blood * Expand the ecosystem (including libraries) * Bring the IDE up to date (this includes fixing the bugs also) I don't care much about RTL and VCL. That I have access to the code and I can patch. But the IDE..... Oh Andreas, why have you forsaken us? 😞 Edited 17 hours ago by GabrielMoraru 1 1 Share this post Link to post
GabrielMoraru 44 Posted 17 hours ago 4 hours ago, Anders Melander said: Is there any reason why you aren't just using the bundled migration tool (apart from the (unsurprisingly) horrible usability of it)? Did they fixed that tool in the end? === I tried it in the past. It didn't worked. I do it manually now. 1 Share this post Link to post
Anders Melander 2111 Posted 17 hours ago 3 minutes ago, GabrielMoraru said: Did they fixed that tool in the end? I think it has always worked. It was just near impossible to understand how to use it. I used it for D11->D12 and D12->D13. Each time I had to do it a few times before I got it right. 1 Share this post Link to post
Mark NZ 14 Posted 13 hours ago 11 hours ago, GabrielMoraru said: Attila: > it only took 10 years Yes, it should have been done 10 years ago in order to be adopted by now. Now if I use it in my public libraries, people will not be able to compile my code unless they have Delphi 13. This is always the catch with new language features... Anyway, I love it! Too bad it was not introduced in Delphi 1! Today is it not as grandiose/necessary, because now we have tools like madShi madExpert (and the other one that I don't want to say its name here)... but still cool to have it! Is NameOf(T) really that much use on it's own? Unless I missed something you still can't get NameOf current method or source file or LineOf/CurrentLine. I would have thought they would have been trivial to add at the same time with minimal extra testing. 1 Share this post Link to post
Joseph MItzen 267 Posted 10 hours ago On 9/12/2025 at 9:40 AM, corneliusdavid said: That's a bit of an exaggerated statement. Code formatting was an optional feature and is most useful if you've inherited old, poorly formatted code or just too lazy to indent properly in the first place (IMHO). Plus, there are other options to continue using it as expressed in the blog. I believe Embarcadero is looking to replace the feature at some point. So, to say this is a huge step back for something so minor is quite petty. Modern IDEs enforce style guides. Modern IDEs were 64-bit a long time ago. Modern IDEs don't break, remove features, then promise to restore them "at some point". Modern IDEs have enough software developers assigned to them to have all features completed before shipping. Modern IDEs don't ship in an incomplete state. Delphi, C++Builder and Interbase, for some time now, do not have enough developers to continue to adequately maintain the products. We've seen code completion break for two years, failure to meet the Android 64-bit requirement date, the current fiasco, Interbase's Python driver fail to work with boolean fields for two years (!!!) until I embarrassed Ian Barker about it after his Interbase webinar when he'd bragged about the driver support, and my favorite, something breaking in the C++Builder tool chain such that, for two years now, all cross-platform compilation has ceased to work and they've taken it out of the product description. Could you imagine paying $1600+ for a cross-compiling C++ toolchain and then the cross-platform feature just disappearing? You can't charge 3 times the cost of Visual Studio, or 6x-16x the cost of a Jetbrains IDE, and have such basic features as code formatting and refactoring disappear. These are almost as basic functions as an undo option or find and replace. They're core to what an IDE is supposed to offer. Imagine giving a sales presentation to a potential IDE purchaser alongside Microsoft and Jetbrains sales reps (in another lifetime I worked at a company where just these kinds of presentations were sometimes held). Imagine what the MS and JetBrains reps would say during their presentations in response to the revelation that your IDE lacks code reformatting and refactoring? THAT'S why this is a big deal. 7 Share this post Link to post
Joseph MItzen 267 Posted 10 hours ago On 9/12/2025 at 9:45 AM, david berneda said: Manual formatting for me is the best way to make sure the code is well done, calmly, as a final double-check there are no big bugs or something missing. I'd never do auto format, a headache to configure the many ways format can be done. It shouldn't be a headache. A language should have a style guide. The IDE should enforce the style guide. There should be a simple setup section to configure the options. Other IDEs handle this just fine, e.g. JetBrains.... 2 Share this post Link to post
Joseph MItzen 267 Posted 10 hours ago On 9/13/2025 at 3:25 AM, 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. Well, that right there is some low-hanging fruit FOR AUTOMATIC CODE FORMATTING. Share this post Link to post
Joseph MItzen 267 Posted 10 hours ago 14 hours ago, Attila Kovacs said: The request was created in 2015 by Horacio, that was what I was referring to. Heh, I proposed a ternary operator in 2012 and learned that Craig Stuntz and another individual whom I can't recall had already submitted a QC request, even including proposed syntax, in 2008! So it only took 17 years, but Ian Barker is waxing poetic about how the ternary operator shows that Embarcadero, almost unique among programming languages, listens to feedback from its users (yes, he really wrote that). I don't think he realizes that almost all other languages are open source and their features are totally driven by their users. The funny thing is that, to the best of my recollection, Embarcadero actually used the same syntax Stuntz and friend proposed in 2008! 1 Share this post Link to post
corneliusdavid 260 Posted 7 hours ago 3 hours ago, Joseph MItzen said: You can't charge 3 times the cost of Visual Studio, or 6x-16x the cost of a Jetbrains IDE, and have such basic features as code formatting and refactoring disappear. These are almost as basic functions as an undo option or find and replace. They're core to what an IDE is supposed to offer. Imagine giving a sales presentation to a potential IDE purchaser alongside Microsoft and Jetbrains sales reps (in another lifetime I worked at a company where just these kinds of presentations were sometimes held). Imagine what the MS and JetBrains reps would say during their presentations in response to the revelation that your IDE lacks code reformatting and refactoring? THAT'S why this is a big deal. Fair points. Share this post Link to post
corneliusdavid 260 Posted 7 hours ago On 9/13/2025 at 9:47 PM, corneliusdavid said: I use the code formatter every day. To clarify why I'm not terribly upset by the removal of refactoring and formatting, 1) refactoring never worked that well so I would always manually search/replace or cut/paste tediously; 2) I'm starting to use MMX Code and like it's capabilities and starting to rely on it and see the great benefits; 3) I still have a quick way to format code using saved profiles from older versions of Delphi; 4) I have hope that there will be a better replacement built into the IDE in the future. If there was no option, no way to refactor or format code and no hope of ever getting it in this IDE, yeah, I would be quite frustrated. But as long as there are alternatives, I'm fine to make do with what's available. It's totally understandable for people to lose patience with Emb for this and other short-comings that have gone on for years; but that's just not where I'm at right now. 1 Share this post Link to post
Lars Fosdal 1920 Posted 7 hours ago @Joseph MItzen VS 2022 Enterprise starts at US$500/month for initial year, then slightly less than half of that for renewal. What prices are you comparing? 1 Share this post Link to post
Dalija Prasnikar 1544 Posted 5 hours ago 1 hour ago, Lars Fosdal said: VS 2022 Enterprise starts at US$500/month for initial year, then slightly less than half of that for renewal. What prices are you comparing? VS Studio PRO one time purchase is 499$ https://www.microsoft.com/en-us/d/visual-studio-professional-2022/dg7gmgf0d3sj Also VS 2022 Enterprise includes Azure and other stuff. There is also as subscription only Enterprise which is 250$ per user monthly again with basic Azure plan. And there is PRO subscription which is 45$ per user monthly. Right now RAD Studio is extremely overpriced. I cannot comment on Enterprise version and the value it provides, but PRO is literally out of reach for many people who would otherwise more than willing to pay some amount of money comparable to what JetBrains or MS offer on the low end. Not to mention that it does not include Linux compiler which is rather ridiculous. Compare that to Delphi 99$ license with which they started 30years ago (which is around 250-300$) in today's value. If Embarcaderos wants to revive Delphi, they seriously need to change their pricing policy on the low end for PRO SKU and even having additional low cost Community edition with perpetual license would take them a long way. 5 Share this post Link to post
Vincent Parrett 884 Posted 5 hours ago To add to the VS information - you can use Visual Studio Community Edition for commercial use: it's free for individual developers and non-enterprise organizations with fewer than 250 PCs or under $1 million USD in annual revenue. It's trivial to install and manage the license for the community edition - and it does a lot (no db limitations etc). That makes Delphi a very unattractive proposition for people starting out. The only place where Delphi wins out (ignoring the price) is for Desktop Windows applications. For everything else, there are better options. I wish it were not the case, but it's too far behind now to ever be able to compete in many spaces (like web, mobile etc). 3 Share this post Link to post