The first messages on G+ saw about Delphi 10.3 Rio are these:
- [WayBack] Delphi 10.3 is online. – Ralf Stocker – Google+
- [WayBack] The platform selection in Delphi Rio seems to be down. – Gert Scholten – Google+
- [WayBack] license.embarcadero.com is down. Perhaps this is a good sign, because of overwhelming interest in Rio, but it does not make a great impression. Can thi… – Johan Bontes – Google+
- [WayBack] Great new feature of 10.3 – Tomasz Kunicki – Google+
- [WayBack] Just installed Delphi 10.3 and used migrationtool.exe to import 10.2 settings, and my projects fail to compile with the following error (I am not even c… – Eric Grange – Google+
- [WayBack] FMX minimize bug fix for Delphi Rio Community. The two screenshots show you how. https://quality.embarcadero.com/browse/RSP-17322 You at home would ne… – Gustav Schubert – Google+
- [RSP-17285] Window minimize-restore via taskbar icon click is broken in all Windows flavours – Embarcadero Technologies (10.1/10.2 problem that was supposedly fixed in 10.3)
- [RSP-17322] Window minimize-restore via taskbar icon click is broken in all Windows flavours – Embarcadero Technologies has the fix for 10.3, but did not make it in 10.3
- [WayBack] I think I figured it out and here is my unofficial update to FMX.Platform.Win ready for beta testing. Improvement claims: 1) click on task bar button w… – Gustav Schubert – Google+
- [WayBack] … but I am working on it. I have already installed the new version and it compiles on my machine. But don’t hold your breath, there are some issues. Unt… – Thomas Mueller (dummzeuch) – Google+
- [WayBack] I’m having serious problems with the license registration. Have submitted a support case this morning but did not get a reply yet, and now it is weekend… – Reinier Sterkenburg – Google+
- [WayBack1/WayBack2] RIO – First thoughts: No additional downloads, no interbase (I check install everything). No love for the Win64 C++ compiler. First time I can recall th… – Joe C. Hecht – Google+
- [WayBack] I’ve had quite a few enquiries about when the Parnassus plugins (Bookmarks and Navigator) are coming to 10.3 Rio. The answer is soon! Ideally, they’d … – David Millington – Google+
-
“I would have preferred to have the plugins ready at the same time Rio shipped, but shipping Rio itself took precedence.” – if you would have done that you would have seen for yourself where it still has some glitches and what is problematic for third party plugin developers before the release, but hey…
-
[WayBack] Are these menus removed in 10.3 Rio? “The context menus for the code editor tabs and files in the Project Manager now have a “Show In Explorer” menu it… – Zhan Wang – Google+
-
They got lost during the IDE revamp – known but not fixed yet. -.-
-
- [WayBack] I have just downloaded 10.3 and after less than 1 minute I already have found an issue. Does this happen to you too? It seems that code insight does n… – Alberto Miola – Google+ about [RSP-21719] Error insight incorrectly marks inline var as error – Embarcadero Technologieswhich has a nice discussion on inline variables (for me, inline variables often indicate a refactor-to-method should take place, but I do like the type inference part), including:
-
+Ralf Stocker On the contrary. Inline variables reduce scope, make code more readable and remove a whole range of potential bugs.
You can make fine mess out of your code with or without inline variables. And if you do it will not be their fault but yours.
-
+Darian Miller So we should never get any new features because existing tutorials will be broken and we will have to learn something new?
If you are confused by reading code with inline variables more than five minutes after you have learned about existence of that feature, maybe you are in the wrong profession.
And no, reducing scope is not code smell. You cannot always refactor into another method. Small methods are good, but they must have some logical organization.
Too much granulation can be equally bad as too less granulation.
-
+Darian Miller First of all, you don’t have to use inline variables if you don’t like them. Cost of readability, departure from historical context/documentation, lack of backward compatibility will equal to zero. Even the tooling will not be broken if you don’t use it (unless, of course you don’t write tools)
Some benefits, there are too many to write them all:
- loop variables – they definitely belong into loop scope, and they do pollute variable declaration block with unnecessary cruft.
- Other temporary variables you may need, that also don’t belong into main declaration block, like explicit references for better handling and more control over compiler introduced implicit references – those are especially useful for controlling ARC references – and we do have ARC in classic compiler, too.
- skip unnecessary automatic initialization/finalization of managed variables in code paths that will not execute – speed optimization.
- Preventing errors (for some you have compiler hints, but if you miss the hint…) – some examples
You cannot forget to initialize variable before use
procedure Test1; begin var sl := TStringList.Create; try finally sl.Free; end; end;
You cannot use variable that belongs to wrong scope and might be uninitialized – this code will not compile
procedure Test2; begin try var sl := TStringList.Create; finally sl.Free; end; end;
5. Type inference – repeating type two times, especially with generics makes code harder to read because while you are skipping reading redundant information, you may skip important one.
This is just the tip of the iceberg. Inline variables are without a doubt extremely valuable feature.
-
Coding will be a lot simpler as Dalija explained. Here an example using generics:
TYourType = TDictionary<String, Cardinal>; TYourClass = class fSomeDic : TYourType public procedure DoSomething; end; implementation procedure TYourClass.DoSomething; begin for var lItem in fSomeDic do litem.Value := 10; end;
As you see this is very easy to read. And litem belongs to the for loop. It doesn’t exists outside. Any reference to it will raise an error.
If you need to change your base type to
TYoutype = TDictionary<string, uint64>;
There’s nothing else to change. No need to hunt every
tpair<K,V>
declaration.You have the tools, use it at you see fit!
- Darian Miller
+Dalija Prasnikar Not sure why I waste the time… but to say cost is zero is just pontification which is sometimes hard to ignore. Say I don’t use the new feature myself as I need to stay on an older version… now, say there’s a new tool just posted to GitHub and it highly leverages this functionality. I cannot use that tool without some effort. The cost is not zero. Say you are on the latest version, but you rely on tooling that cannot parse this new form of variable definition. Your tooling for code documentation, coverage analysis, static code analysis could be completely broken the second any of this code gets introduced into the project. I simply object to saying there’s zero associated cost. That’s really not true. There are actual, real-life difficulties introduced with a major change like this. For me, the costs (all of them) are not worth the benefits (which I acknowledge are present.) But this is a really moot because it wasn’t my decision to introduce this feature at this time (which I would have vehemently voted against – at this time.) I haven’t checked to see if Peganza’s tools were upgraded to handle this version. My assumption is they haven’t, so this coding style is forbidden in new code until such time as the tooling catches up.
-
- So Error Insight got no changes, which means old bugs are still there: [WayBack] 7 Major versions later and Delphi hasn’t improved a bit! Delphi IDE’s error insight complains about this perfectly valid code: if aHeader.RecType…. – Graeme Geldenhuys – Google+
- [WayBack] +Marco Cantù is unstoppable. I can’t keep up LOL – Clement Doss – Google+
-
I’m wondering why use zlib 1.2.8 when 1.2.11 is available since January 15, 2017? zlib.net – zlib Home Site
- [WayBack] zlib Home Site: Current release: zlib 1.2.11 January 15, 2017
-
- [WayBack] I have one application, which when I compile it for Win32, ends its compile with: F2084 Internal Error: C2527. This is in Delphi 10.3 Rio. When compili… – Reinier Sterkenburg – Google+
- [RSP-21806] F2084 Internal Error: C2527 – Embarcadero Technologies
program Test_C2527; {$APPTYPE CONSOLE} uses Generics.Collections; type TData = record Z: Integer; end; var Q: TThreadedQueue; begin end.
- I’ve checked: Adding a string to the record helps.
Making it a class instead of a record also helps.
- I’ve checked: Adding a string to the record helps.
- [RSP-21790] Records & Int64 [dcc32 Fatal Error] F2084 Internal Error: C5551 – Embarcadero Technologies
- I also noticed that the error when deactivating the optimization in the project options, no longer occurs .
Project > Options > Delphi Compiler > Compiling -> [ Optimization := False ] works
Project > Options > Delphi Compiler > Compiling -> [ Optimization := True ] doesn’t work
- I also noticed that the error when deactivating the optimization in the project options, no longer occurs .
- [RSP-19558] F2084 Internal Error: C2489 – Embarcadero Technologies
program Project3; {$APPTYPE CONSOLE} uses Generics.Collections, Types; type TDateAndRawData = record Values : PDouble; // pointer to the data 'array' end; TDataQueue = TThreadedQueue<TDateAndRawData>; begin end.
- Changing “record” to “class” makes the error disappear.
- I also get the error with “values : integer”.
It seems to fail with any non-managed items. Adding a managed field (e.g. x: string) to the record helps! - It fails for 32-bit Windows target platform.
For 64-bit Windows target platform it compiles without issue.
Other target platforms not tested…
- [RSP-21806] F2084 Internal Error: C2527 – Embarcadero Technologies
- [WayBack] Delphi IDE Explorer is broken in Delphi 10.3 Rio – twm’s blog because the Project Options dialog now uses the Screen.OnActiveControlChange event itself and does not bother to call the original event.
- Via [WayBack] I just found out what is wrong with my Delphi IDE Explorer in Delphi 10.3 Rio. The symptom is that the Follow Focus option and the Select Active button … – Thomas Mueller (dummzeuch) – Google+
- Related (conference worthy!): [WayBack] Safe event hooking for Delphi IDE plugins revisited – twm’s blog
- [WayBack] Andreas on Twitter: “What’s with the Delphi Rio Debugger? The CPU view shows the wrong XMM registers in the disassembly. The blue dots in the RTL/VCL (rtl.bpl/vcl.bpl) are at the correct position but when debugging (breakpoints, stop over/in) the debugger jumps like crazy through the code.”
- [WayBack] I’m wondering today after receiving my renewal quote which is 50% of the value of a new license, do we ever get the right to force Embarcadero to do wha… – Andrew Pratt – Google+
- [WayBack] Delphi 10.3 Rio – Language Changes – VSoft Technologies blog via [WayBack] Blogged – Delphi 10.3 Rio Language Changes – Vincent Parrett – Google+:
So lets take a look at which suggestions made the cut for 10.3 – referencing my original post.
Feature Implemented Comments … No Type Inference Yes! For inline variables only, Confuses code insight! Inline variable declaration, with type inference and block scope Yes, Yes and Yes! Confuses code insight! Loop variable inline declaration Yes! Confuses code insight! … No
Related:
- [WayBack] Andreas on Twitter: “Using Delphi Rio and wondering why the IDE behaves differently. Well, while making DDevExtensions compatible with Rio there is no DDevExtensions for Rio.”
I think I will wait a while before installing until more positive messages are being published.
If you do want to try, the hashes of delphicbuilder10_3_0_94364.iso
are these:
crc32 157b6e36 md5 0882d58cb53a7d0a828cc45d06c6ecd0 sha1 21579b530f781895885923809d9e670b439ebf9d sha256 9213de93c2abdd6a2ee23aa84fc7e63a87d62d0344f0d0f0ee162d0e7dce7c7d
and for the radstudio10_3_0_esd_94364.exe
they are:
crc32 033aeb53 md5 b25fab9d5f0724fb1d59ea77deff6702 sha1 289bbf33c90ae43b151af116e1e7c7a5348591e6 sha256 fb9a825ddaf235441ff72c10fbb03d2cf94adb3f037508e69f0978a37dc95773