![]() |
More on Delphi, C++, and Memory safety
A couple of weeks*ago I wrote a blog post, available on Embarcadero blog site at
![]() ![]() Here I want to add a couple more links. The first very nice article by Craig Chapman, titled "Memory Safety and Object Pascal" (see* ![]() There is also a significant rebuttal of the argument in that document by the C++ community, starting with C++ creator,a s you can read in "C++ creator rebuts White House warning" at* ![]() One element I mentioned already and I want to underline, and that is present in the research and documents behind the recent US government paper, is*that memory safely in terms of allocations and references is only one of many elements. Type safely is mentioned a lot. While Delphi has pointers, Pascal has typed pointers from day one. Having a pointer to Integer and increasing it by 1 to move to the next element of a data structure is arguably much safe than using a generic pointer and increasing it by 4 or 8 depending on the pointer size.* Also consider the use of strings in Delphi, compared to C and C++. Or dynamic arrays. Or the fact core types like integers and characters or Boolean*are not all equivalents. A stronger type system implies more compile time checks and fewer runtime checks and runtime errors. ![]() |
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:59 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz