Исправление
stevejobs,
(текущая версия)
:
сделать объект, неизменным везде, кроме нескольких мест, например, неизменным в одном потоке и изменяемым в другом
вот замечательно-то! особенно когда в другом месте меняет другой человек, а ты потом have a nice debug! всю жизнь мечтал о такой фиче, которая добавляет седых волос на голове!
в нормальных языках, когда человек говорит, что что-то неизменяемо - оно должно быть неизменяемым. Вообще. Никогда. Никак. Никакими способами. Значит даже небо, даже Аллах не смогут ничего поделать с этой неизменяемостью.
может хардварой, а может и чем-то другим
14882-2011, 1.9.12
Accessing an object designated by a volatile glvalue (3.10), modifying an object, calling a library I/O function, or calling a function that does any of those operations are all side effects, which are changes in the state of the execution environment. Evaluation of an expression (or a sub-expression) in general includes both value computations (including determining the identity of an object for glvalue evaluation and fetching a value previously assigned to an object for prvalue evaluation) and initiation of side effects. When a call to a library I/O function returns or an access to a volatile object is evaluated the side effect is considered complete, even though some external actions implied by the call (such as the I/O itself ) or by the volatile access may not have completed yet.
Исходная версия
stevejobs,
:
сделать объект, неизменным везде, кроме нескольких мест, например, неизменным в одном потоке и изменяемым в другом
вот замечательно-то! особенно когда в другом месте меняет другой человек, а ты потом have a nice debug! всю жизнь мечтал о такой фиче, которая добавляет седых волос на голове!
в нормальных языках, когда человек говорит, что что-то неизменяемо - оно должно быть неизменяемым. Вообще. Никогда. Никак. Никакими способами. Значит даже небо, даже Аллах не смогут ничего поделать с этой неизменяемостью.
может хардварой, а может и чем-то другим
14882-2011, 1.9.12
Accessing an object designated by a volatile glvalue (3.10), modifying an object, calling a library I/O function, or calling a function that does any of those operations are all side effects, which are changes in the state of the execution environment. Evaluation of an expression (or a sub-expression) in general includes both value computations (including determining the identity of an object for glvalue evaluation and fetching a value previously assigned to an object for prvalue evaluation) and initiation of side effects. When a call to a library I/O function returns or an access to a volatile object is evaluated the side effect is considered complete, even though some external actions implied by the call (such as the I/O itself ) or by the volatile access may not have completed yet.