줄이고, 기존 타입에 새로운 메서드를 추가한 것과 같은 효과를 낼 수 있고, 도메인 특화 언어
domain
specific
language
(
DSL
)의 생성을 지원할 수 있다.
암시가 논란의 대상이 되는 이유는 암시를 찾을 때 소스 코드에서 ‘지역적이 아닌’ 부분까지 고
려하기 때문이다. 여러분은
Predef
(
http
://
bit
.
ly
/
1086O2z
)에서 자동으로 임포트되는 경우
를 제외한 나머지 암시적 값이나 메서드를 지역 범위에 임포트한다. 컴파일러는 범위 안에 들
어온 암시를 호출해서 메서드에 인자를 제공하거나, 인자 중 일부를 원하는 타입으로 변환한
다. 하지만 소스 코드를 읽을 때는 어떤 암시적 값이나 메서드를 활용하고 있는지 분명히 알아
보는 것이 쉽지 않고, 그래서 혼란에 빠질 수 있다. 다행히 경험을 통해 어떤 경우에 암시가 관
련이 있는지 알 수 있고, 암시를 활용하는
API
를 배우게 된다. 그럼에도 불구하고 초보자들은
함정에 빠지기 마련이다.
암시가 어떻게 작동하는지 이해하는 것은 상당히 단순하다. 이번 장은 꽤 길지만, 그중 대부분
은 암시가 해결할 수 있는 설계 문제를 다루고 있다.
5.1
암시적 인자
2
.
5
.
3
절 ‘
Future
맛보기’에서 ...
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.
O’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
I 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
I’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
I'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.