Quantcast
Channel: Delphi – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 1440

delphi – IfThen(Assigned(Widget), Widget.Description, ‘No Widget’) doesn’t crash. Should it? – Stack Overflow

$
0
0

Very interesting question [WayBackdelphi – IfThen(Assigned(Widget), Widget.Description, ‘No Widget’) doesn’t crash. Should it? – Stack Overflow.

Three important things here:

  • depending on inlining and kind of arguments, function calls can evaluate their arguments one or multiple times
  • lacking formal language specification, you never know if a method will be inlined or not
  • function calls should not have side effects

Via another interesting discussion at [WayBack] Inline functions are not guaranteed to evaluate their arguments exactly once… – David Heffernan – Google+

–jeroen


Viewing all articles
Browse latest Browse all 1440

Trending Articles