Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It doesn't copy anything - it literally is calling "Array.new()" to generate a new array, every time one is needed.

To do it the python way, you'd have to use a global variable to store the array - which is exactly what python is doing for you. Doesn't sound so handy when its put like that, huh?



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: