When designing public APIs for libraries, avoid trying to guess user intent by inferring behavior from limited information. A code example shows an AddAttachment method that automatically determines content type from file extensions, which limits flexibility and forces library updates for new file types. Instead, let callers
•3m read time• From ayende.com
5 Comments
Sort: