GeekNews

assert를 반드시 고쳐야 한다 (opens in new tab)

assert는 사전 조건·사후 조건·불변식을 코드로 명시하는 장치이며, 타입 시스템으로 강제 가능한 제약은 언어 기능으로 표현하는 편이 바람직함Zig의 std.debug.assert는 매크로가 아닌 일반 함수로, unreachable을 통해 도달 불가능한 경로를 표시하고 최적화에도 활…

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help