Skip to Content
우아한 C언어 코딩 패턴
book

우아한 C언어 코딩 패턴

by Christoper Preschem, 정기훈(Jung Ki Hun)
April 2024
Beginner to intermediate
364 pages
7h 2m
Korean
Insight
Content preview from 우아한 C언어 코딩 패턴
Fluent
14
󻱴󽴔󽴔󻫳󺸧󽴔󼅧󺹻
인 특별한 경우에 상수
ERROR
를 반환한다. 이제 호출자는 반환 값을 확인하여
유효하지 않은
NULL
값이 파라미터로 함수에 전달되었는지 여부를 알 수 있다.
그러나 이러한 유효하지 않은 파라미터 값은 일반적으로 프로그래밍 오류를
나타내기 때문에 프로그래밍 오류를 확인하고도 코드 내에 이 정보를 전파하
도록 놔두는 건 좋은 생각이 아니다. 그런 경우에는 그냥 무사의 원칙(Samurai
Principle)을 적용하는 편이 더 쉽다.
󻀃󻕻󻰧󽴔󻮟󼌨
󼎷󼘜󻝳󼞇
오류 처리가 복잡한 코드가 일부 있는데 몇몇 오류는 굉장히 심각한 수준이다.
여러분의 시스템은 위험한 동작에 대한 안정성을 보장하지 않으며, 높은 가용
성을 요구하지도 않는다.
󻀇󻳫
󻫳󺸧󽴔󻳤󻇃󺹋󽴔󻃧󼬧󼨯󽴔󺨛󽴔󼬇󼉫󻱟󺃏󽴔󻱃󽴔󻳤󻇃󺹋󽴔󼬤󻱇󼨫󺞳󺆯󽴔󺃏󻳤󼨫󺞳󺋇󺲻󺕧󽴔󼬇󼉫󻱟󺃏󽴔󻫳󺸧
󻳤󻇃󽴔󼬤󻱇󻰓󽴔󻖬󺲄󼨧󻪻󽴔󻫳󺸧󺃏󽴔󻨛󺳳󻺏󻺏󽴔󻨙󻰏󽴔󻖐󼖫󺴫󽴔󻺏󻙜󺣯󽴔󻛧󽴔󻱗󺞳
C에서는 피호출 함수의 반환 값을 확인하는 것이 의무 사항이 아니기 때문
에 호출자는 함수의 반환 값을 그냥 무시할 수 있다. 함수에서 발생하는 오류
가 심각한 수준인데 호출자가 제대로 처리할 수 없다면, 호출자가 오류 처리
여부와 그 방법을 결정하도록 내버려두고 싶지는 않을 것이다. 그 대신, 조치
를 확실히 취해야 한다.
호출자가 오류 상황을 처리하더라도 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

파이썬으로 살펴보는 아키텍처 패턴

파이썬으로 살펴보는 아키텍처 패턴

오현석, 해리 퍼시벌, 밥 그레고리
클라우드 네이티브 애플리케이션 디자인 패턴

클라우드 네이티브 애플리케이션 디자인 패턴

카순 인드라시리, 스리스칸다라자 수호티얀
개발 7년차, 매니저 1일차

개발 7년차, 매니저 1일차

권원상, 한민주, 카미유 푸르니에

Publisher Resources

ISBN: 9788966264742