Sealed classes

Sealed classes

As part of version 1.3 of NGenerics, I’ve finally remove most of the sealed keywords from the classes (where it made sense). It took me a while, but I’ve accepted the following rule (and Microsoft is of the same opinion, it seems) :

Never seal a class unless there’s a very good reason to do so (like it being internal, security reasons, etc). Programmers using your library will use it many creative ways you can’t even imagine, and sealing a class limits that creativity.

Also see the post here.

Photo by Adam Wilson on Unsplash


See also