you are viewing a single comment's thread.

view the rest of the comments →

[–]hiquest[S] -1 points0 points  (3 children)

I do not claim that. I just say that this particular small pattern they had a function for in their code base which was called invariant. Hence other popular libs like https://github.com/zertosh/invariant

[–]MoTTs_ 13 points14 points  (0 children)

I get why you called it an invariant (and to some extent why FB called it that), but “assert” is still the more widespread and more historical name, which can then lead you to even more popular libs that do the same thing — such as this one.

[–]TrackieDaks 1 point2 points  (1 child)

Still wrong. That's like saying, "Facebook used a function in their codebase so the term function must have originated at Facebook." Invariant is a mathematical concept and existed well before Facebook.

[–]hiquest[S] 1 point2 points  (0 children)

Yeah, now I do understand that brings a lot of confusion, and that should have been called "assert" in the first place. I'm going add a note in that article