|
|
|
|
|
by ovis
1449 days ago
|
|
> But they don't mutate data and hence every function call creates a new data in memory taking up space. Well, only if you mutate the data. And even then, most functional languages provide persistent data structures that allow efficient sharing of the unchanged parts of the data structure. > Now my question is where do I learn about these nitty gritty's? Should I read about compilers more? Or systems? Or what? I'd recommend choosing a functional language and an imperative language and learning both. |
|
So you are saying that in imperative setting if we use the original data for multiple functions we have to create copies of it and then modify those copies. So we end up taking extra space there also. So both languages take up space. One before the function call another after.