(언어별) Immutability 정리

2022. 1. 29. 20:41

immutable objects → can be shared among many processes/threads

 

concurrent programming에서 중요한 개념?

 

 

https://en.wikipedia.org/wiki/Immutable_object#Immutable_variables

 

Immutable object - Wikipedia

From Wikipedia, the free encyclopedia Jump to navigation Jump to search Object whose state cannot be modified after it is created In object-oriented and functional programming, an immutable object (unchangeable[1] object) is an object whose state cannot be

en.wikipedia.org

 

immutable object는 copy하지 않고 주로 reference를 넘겨서 access 하는게 효율적

 

C/C++ - Built-in immutable 값은 없는 것 같은데. 숫자 literal?

Java - 대표적으로 String

Python - Number, String, boolean, tuple, ...

+ Recent posts