关于[Stop using trivial Guard Clauses! Try this instead]的摘要:
Guard clauses, on the surface, sound like a great idea. They can reduce conditional complexity by exiting a method or function early. However, I find guard clauses used in the real world to be of little value. Often polluting application-level code for trivial preconditions. I will refactor some code to push those preconditions forcing the edge of your application so your domain focuses on real business concerns.
原文地址: https://codeopinion.com/stop-using-trivial-guard-clauses-try-this-instead/