Likelihood That Classes Are Loaded

#rofl-code
2024-02-26

Pasted image 20240226231335.png
Engine\\Plugins\\MovieScene\\MovieRenderPipeline\\Source\\MovieRenderPipelineCore\\Private\\MovieRenderPipelineCoreModule.cpp [:37]

When doing some Static Analysis of the MovieRenderPipeline for a freelancer Project I came across this little gem inside the source code of the UE 5.3 and I then proceeded to share this with my friend Jonathan while mocking the pitfalls of Object-Oriented programming.

I will leave the chat protocol here of our conversation as self-explanatory guideline for those who need a bit of help spotting the joke.

  • _[11:05 PM]
    I am seriously laughing out loud right now -- Made my night. (edited)

  • _[11:10 PM]
    "Register a hook to wait until the engine has finished loading to increase the likelihood that the desired classes are loaded." In Haskell you can proof programs for Correctness at Compile Time, in C++ You write code that increases the Likelihood of something working as intended at runtime... (edited)

  • [11:10 PM]
    Now you know why certain "mathematically elegant concepts" are useful.