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 버전 기반)
561
15
스칼라 타입 시스템 II
class C7
{
val name1
=
P1
.
O1
.
O2
.
name
//
OK
-
필드에
대한
참조
type C1
=
P1
.
O1
.
C1
//
OK
-
말단
클래스에
대한
참조
val c1
=
new P1
.
O1
.
C1
//
OK
-
위와
같은
이유
//
val name2
=
P1
.
O1
.
C1
.
name
//
오류
-
P1
.
O1
.
C1
안정적이지
않음
}
C7
의 멤버인
name1
,
C1
,
c1
은 경로의 마지막 부분을 제외하고는 모두 안정적인 요소를 사용하
지만,
name2
는 안정적이지 않은 요소 (
C1
)를 끝에서 두 번째 위치에 사용했다.
마지막의
name2
선언의 주석을 제거하면 다음과 같은 컴파일 오류가 나는 것을 보고 이를 알 수
있다.
[
error
]
.../
typepaths
/
path
-
expressions
.
scala
:
52
:
value C1 is not a member of
object progscala2
.
typesystem
.
typepaths
.
P1
.
O1
[
error
]
val name2
=
P1
.
O1
.
C1
.
name
[
error
]
^
물론 코드에서 복잡한 경로를 사용하지 않는 편이 더 좋은 생각이다.
15.2
의존적 메서드 타입
스칼라
2
.
10
에 추가된 기능으로 의존적 메서드 타입
dependent
method
type
이 있다. 이는 ...
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