- Các kỹ sư của go ghét exception
- Go chưa có chứ không phải không có
- Exception là thứ gì đó quá nặng nề
- If else error có vẻ tường minh hơn
- Exception không thể áp dụng được cho go
We want to connect the people who have knowledge to the people who need it, to bring together people with different perspectives so they can understand each other better, and to empower everyone to share their knowledge.
We believe that coupling exceptions to a control structure, as in the try-catch-finally idiom, results in convoluted code. It also tends to encourage programmers to label too many ordinary errors, such as failing to open a file, as exceptional.
Tuy nhiên mình thấy nó chưa thực sự thuyết phục cho lắm, và mình nghĩ go cũng nên support exception, bởi vì việc xử lý exception có thể gom về xử lý tập trung thay vì phải xử lý lỗi ở nhiều nơi như hiện giờ.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Input your email to receive reset password link, or if you remember your password, you can click