I recently needed to generate a random number in vim and this question gave me all the solutions I needed.But I still have a question: Why is there no built-in function to generate a random number? I mean the vimscript language provides functions to work with numbers like round(), min(), the basic operators +-*/, so what explains that the absence of a rand() function?For now I see 2 possible explanations but I wasn't able to validate any of them:Technical limitations: I know the bad reputation of this language but I don't see what would make it unable to generate a random number.Ideological limitation: The creator of vim script could have decided that the language being made to edit text, doesn't need to generate random numbers and this functionality shouldn't be available to the user. I'm not a Vim guru but I don't understand how including such a function would hurt anything or anyone.Is there another reason that I couldn't figure out by myself? Could someone enlighten me on this? 
Why doesn't vimscript provide a random number generator?
history of
Because the patches have been sitting in the TODO list for almost five years.Don't forget, vimscript wasn't designed: it is only the ever-changing interim result of a slow evolutionary process. Hell, it didn't even have an actual name in the doc until VimL was discreetly slipped in a bit before 7.4.