@bgl@hackers.pubbgl gwyng
@hongminhee@hackers.pub洪 民憙 (Hong Minhee) unwrap을 쓰는 것은 null pointer의 다른 이름으로써 null이면 panic이게 하는 것이 의도가 맞습니다..?
@pbzweihander쯔방
@hongminhee洪 民憙 (Hong Minhee)
Option
이란 이름을 붙인거 치고는 unwrap
을 큰 죄책감없이 쓰는거 같다는 이야기였습니다.
If you have a fediverse account, you can reply to this note from your own instance. Search https://hackers.pub/ap/notes/0197b510-0b60-795e-9f91-f22dde67a5e6 on your instance and reply to it.
@bgl@hackers.pubbgl gwyng
@hongminhee@hackers.pub洪 民憙 (Hong Minhee) unwrap을 '죄책감'으로 취급하기에는 저는 unwrap을 명시적으로 부를 수 있다는게 오히려 큰 장점이라고 생각해요. panic이 나면 버그인거고, 그 버그를 트래킹할 때 unwrap을 부른 부분만 조사하면 되니까 인지하기 쉬우면서, 버그가 일어나지 않는 상황에서는 분기를 줄여서 가독성이 향상되니까요.