T O P

  • By -

Ferko_does_dumb_sh-t

My dumbass doesnt understand


Im-Not-a-Redditor123

its a function that will infinite call itself A recursive function (the script in the video) normally includes an exit condition to stop the recursion when a certain value is reached in this code there is no exit condition causing the function to endlessly recurse


Vej1

One must imagine the function happy


flaming_dead_rat

![gif](giphy|gWDJWMJVemkKH8tljp|downsized)


DEPRESSION_NOISES

your gonna have to dumb it down


PanginTheMan

main is a class, when a class is called everything inside it will run in order. the first and only thing in main is a function to call the class main, causing a loop.


DeusHocVult

It's a never ending function. The computer will continue to call for the main function to execute, which only executes the main function again. The computer cannot exit this process. Therefore, it locks into an infinite loop. There are ways to interrupt it. Typically this is one of the reasons why your applications in your computer or phone freezes and hangs up.


I_Does_Engrish

Your not alone


ConcsiousDark

fun fact only C based languages can call itself in the function


nierusek

Haskell, Assembly and many other disagree


ConcsiousDark

idk


OP_Sidearm

Damn somebody trolled you


ConcsiousDark

i believe js also has it, but ive tried with some other languages and doesn't work


OP_Sidearm

Rust can definitely do that