Forum > General

AV during runtime, because Compiler does not check the String-Format by "Format"

<< < (5/5)

marcov:

--- Quote from: Thaddy on April 08, 2024, 08:51:02 pm ---I think the C# confusion comes from "reflection", like in Java too (or for that matter FPC's RTTI)
But all of that is runtime oriented, not compile time.

--- End quote ---
As those languages are just in time, the source (or a direct representation) is available, so also the identifier names. (which among others makes those languages easy(ier) to reverse engineer).

In compiled languages, normally identifiers are no longer available past compilation. Extended RTTI circumvents that for specific cases, but I would think hard and long before I would use it when not necessary.

It is bulky, and all forms of RTTI relatively slow.

Format line checking can be done, but in C, where interpretive I/O is the norm, this is more common than in FPC/Delphi where it is more a peripheral (library) functionality.  Moreover, in C it yields access violations, while in FPC a mild, recoverable exception

Leledumbo:
Might be a valuable extension, though kinda clutter the compiler (scanner I believe) and slow it down. Even in C and C++ compilers it is their own innovation, not part of the standard, as this error is very common in their basic I/O (printf/scanf) and could be quite annoying for starters (and can even still happen to the experienced). WriteStr should be promoted more than Format, it's more inline with the safety of Write(Ln).

Navigation

[0] Message Index

[*] Previous page

Go to full version