Skip to Content
프로그래밍 스칼라: 실용적인 스칼라 활용법을 익히는 가장 확실한 실전 바이블 (2.11.x 버전 기반)
book

프로그래밍 스칼라: 실용적인 스칼라 활용법을 익히는 가장 확실한 실전 바이블 (2.11.x 버전 기반)

by 오현석, 딘 왐플러, 알렉스 페인
July 2016
Beginner to intermediate
776 pages
17h 26m
Korean
Hanbit Media, Inc.
Content preview from 프로그래밍 스칼라: 실용적인 스칼라 활용법을 익히는 가장 확실한 실전 바이블 (2.11.x 버전 기반)
503
스칼라는 자바의 공개
public
, 보호
protected
, 비공개
private
, 그리고 기본 패키지 영역
1
가시성을 훨
씬 넘어서는 가시성 제어를 제공한다. 객체지향 언어의 가시성 규칙은 어떤 타입에서 필수적인
추상화만 공개하고, 구현과 관련한 자세한 사항은 캡슐화해서 외부에 보이지 않게 감추기 위해
만들어졌다.
이번 장은 가시성에 대해 자세히 다룰 것이다. 솔직히 말해 이 주제는 무미건조하다. 피상적으로
보면 스칼라의 가시성은 공개가 기본이라는 점을 제외하면 자바의 규칙과 같다. 스칼라는 훨씬
복잡한 영역 규칙을 제공하지만, 일상의 스칼라 코드에서는 그런 규칙을 자주 볼 일이 없다. 따
라서 이번 장의 앞부분은 대충 읽고 넘어가고, 결론적인 부분인
13
.
7
절 ‘가시성에 대한 마지막
고찰’은 자세히 보기 바란다. 이번 장은 특히 여러분이 직접 라이브러리를 작성하기 시작하면서
자세한 내용이 필요한 경우에 참조하면 된다.
13.1
공개: 기본 가시성
자바와 다르지만, 그러나 대부분의 다른 객체지향 언어와 비슷하게, 스칼라는 기본적으로 공개
가시성을 사용한다. 자신만 볼 수 있도록 가시성을 제한하기 위해 어떤 타입의 멤버를
private
1
역주_ 때로이를‘패키지전용(
package
private
)’이라고부르기도한다.패키지안에있는모든클래스에서그멤버를볼수있기때문이다. ...
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

스파크를 이용한 자연어 처리 : 대규모 텍스트를 다루는 가장 효율적인 딥러닝을 만나다

스파크를 이용한 자연어 처리 : 대규모 텍스트를 다루는 가장 효율적인 딥러닝을 만나다

이창현, 앨릭스 토머스

Publisher Resources

ISBN: 9788968482755