What’s the piece of Delphi knowledge you find yourself looking up over and over again…


From an interesting thread at [WayBack] What’s the piece of Delphi knowledge you find yourself looking up over and over again? For me format strings is probably the thing that most stubbornly… – Lachlan Gemmell – Google+

[WayBack] format strings
Generics, as not much has changed in the docs since [WayBack] Overview of Generics or the linked articles:

[WayBack] Terminology for Generics
[WayBack] Declaring Generics
[WayBack] Overloads and Type Compatibility in Generics
[WayBack] Constraints in Generics
[WayBack] Class Variable in Generics
[WayBack] Changes in Standard Functions and Grammar

[WayBack] Declared Constants: Typed Constants
File extenions with or without dot? The prefix period is included [WayBack] Delphi Basics : extractfilename command, but the file NAME does not include a prefix backslash:

[WayBack] AnsiStrings.ExtractFileExt Function
[WayBack] AnsiStrings.ChangeFileExt Function

[WayBack] irregular syntax, for instance record constants
[WayBack] variant parts in records

On the generics side, I have wrote a few bits in my blog before, often pointing to information by others (many by Stefan Glienke as his skills on this topic are beyond excellent):

Delphi Constraints in Generics – RAD Studio XE documentation wiki
Impossible: Property using Generics in Delphi. Interfaces/classes/methods/fields/constraints/type inferencing are
How do I test an interface? Should I even do that? | Software on a String
As Delphi generics are not supported for free functions, wrap them in a record container
Workaround for Delphi 2010 compiler error “E2076 This form of method call only allowed for class methods” when it infers a generic parameter type
The Default magic function in Delphi
Reminder: rebuild my Nullable Types based on Class Operators in Delphi
Implementing Memoize in Delphi 2009 – Community Blogs – Embarcadero Community
Delphi XE8 things I learned from the first week of G+ reading
Delphi/Fortran memory allocation difference: row/column major order makes a big difference. StackOverflow answer
Spring4D: How is the GlobalContainer intended to be used? Are there important don’ts?
Delphi: do not mix interfaces and classes part X
If you use Delphi or RAD Studio 10.2.2, ensure you have the latest one installed (build 2004) as it fixes some binary DCU incompatibility bugs
Reminder to self – proposals for Delphi Language Enhancements, a year later
Delphi and the joy of Compiler Intrinsics – I cant use “Length” as a TFunc…
Delphi sorcery: Generics, modules and typeinfo
Interesting discussion about generic Dictionaries in Delphi (via: Steve Maughan – Google+ – TObjectDictionary Advice Needed)
Stefan Glienke on Delphi generics: Implementing List Enumerator OfType in Delphi – Stack Overflow
Implementing Memoize in Delphi 2009 – Community Blogs – Embarcadero Community
Delphi history: No, dynamic arrays do not support a non-zero lower bound, but what if you want them? – via Stack Overflow
Looking for more examples of Unicode/Ansi oddities in Delphi 2009+
Delphi analog to C# ?? null-coalescing operator and Light Table like debugger evaluation
Some interesting Delphi posts by Stefan Glienke – Spring4D maintainer
Delphi XE8 things I learned from the second week of G+ reading
Some links to Delphi Unit Testing history
Default comparers in Delphi used by TArray.Sort (via: Stack Overflow)
Call for help: Spring4D and Delphi MultiCast events: working for Win32, Win64 and Mac OS X x64, but Android/iOS ARM help needed
More Delphi PDF manuals (via: Cape Cod Gunny Does Delphi: The One Manual Every Delphi Programmer Should Have!)
Some Delphi libraries and ideas you should take a look at (link clearance)
Some words on Unicode in Windows (Delphi, .NET, APIs, etc)
Another case against FreeAndNil
On List growth strategies and memory managers
RAD Studio 2015 Roadmap – Blogs
CodeRage 9 Q&A: Advanced RTTI in Object Pascal (Ray Konopka)
co-worker question: what is better, extension methods or helper classes?

And on records:

Delphi “Variant Records”, a few notes
Undocumented Delphi record alignment directive – Chee Wee’s blog: IT solutions for Singapore and companies worldwide
Record helpers can do wonders for code clarity
Delphi: ^TNodeData incompatible with PNodeData – {$T+} versus {$T-}

There are some very good books on Delphi though that dig deeper than the documentation:

Delphi books you should have or have read


Comments are closed.