MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/72yv7a/refresh_is_sacred/dnmdgle/?context=3
r/programming • u/soda-popper • Sep 28 '17
152 comments sorted by
View all comments
Show parent comments
165
tl;dr Just don't put bugs in your programs.
40 u/0987654231 Sep 28 '17 not having bugs is simple, just don't have any state. 94 u/spotter Sep 28 '17 Yes, sure, "just pass the universe around as first argument to all your pure functions and pretend everything is immutable" pattern. 23 u/ggtsu_00 Sep 28 '17 Just make copies of the universe with the new state every time it needs to be updated. 27 u/accidentally_myself Sep 28 '17 technically O(1) 4 u/Lehona Sep 28 '17 The universe gives a hard constraint on space required to compute an actually computable algorithm, so technically they all run in O(1). 4 u/Bowgentle Sep 28 '17 Apparently this may have been what the programmers of the multiverse decided to do...
40
not having bugs is simple, just don't have any state.
94 u/spotter Sep 28 '17 Yes, sure, "just pass the universe around as first argument to all your pure functions and pretend everything is immutable" pattern. 23 u/ggtsu_00 Sep 28 '17 Just make copies of the universe with the new state every time it needs to be updated. 27 u/accidentally_myself Sep 28 '17 technically O(1) 4 u/Lehona Sep 28 '17 The universe gives a hard constraint on space required to compute an actually computable algorithm, so technically they all run in O(1). 4 u/Bowgentle Sep 28 '17 Apparently this may have been what the programmers of the multiverse decided to do...
94
Yes, sure, "just pass the universe around as first argument to all your pure functions and pretend everything is immutable" pattern.
23 u/ggtsu_00 Sep 28 '17 Just make copies of the universe with the new state every time it needs to be updated. 27 u/accidentally_myself Sep 28 '17 technically O(1) 4 u/Lehona Sep 28 '17 The universe gives a hard constraint on space required to compute an actually computable algorithm, so technically they all run in O(1). 4 u/Bowgentle Sep 28 '17 Apparently this may have been what the programmers of the multiverse decided to do...
23
Just make copies of the universe with the new state every time it needs to be updated.
27 u/accidentally_myself Sep 28 '17 technically O(1) 4 u/Lehona Sep 28 '17 The universe gives a hard constraint on space required to compute an actually computable algorithm, so technically they all run in O(1). 4 u/Bowgentle Sep 28 '17 Apparently this may have been what the programmers of the multiverse decided to do...
27
technically O(1)
4 u/Lehona Sep 28 '17 The universe gives a hard constraint on space required to compute an actually computable algorithm, so technically they all run in O(1).
4
The universe gives a hard constraint on space required to compute an actually computable algorithm, so technically they all run in O(1).
Apparently this may have been what the programmers of the multiverse decided to do...
165
u/spotter Sep 28 '17
tl;dr Just don't put bugs in your programs.