注冊(cè) | 登錄讀書好,好讀書,讀好書!
讀書網(wǎng)-DuShu.com
當(dāng)前位置: 首頁出版圖書科學(xué)技術(shù)工業(yè)技術(shù)建筑科學(xué)建筑設(shè)計(jì)Scala編程(第3版)

Scala編程(第3版)

Scala編程(第3版)

定 價(jià):¥144.00

作 者: (德)Martin Odersky(馬丁.奧德斯基),(美)Lex Spoon(萊·斯彭),(美)Bill Venners(比爾·凡納斯)
出版社: 電子工業(yè)出版社
叢編項(xiàng):
標(biāo) 簽: 程序設(shè)計(jì) 計(jì)算機(jī)/網(wǎng)絡(luò) 其他

ISBN: 9787121328428 出版時(shí)間: 2017-11-01 包裝: 平裝-膠訂
開本: 16開 頁數(shù): 832 字?jǐn)?shù):  

內(nèi)容簡(jiǎn)介

暫缺《Scala編程(第3版)》簡(jiǎn)介

作者簡(jiǎn)介

暫缺《Scala編程(第3版)》作者簡(jiǎn)介

圖書目錄

序 ........................................................................................................XXIV
致謝 .....................................................................................................XXVI
引言 .....................................................................................................XXIX
第1章 一門可伸縮的語言 ..........................................................................1
1.1 一門按需伸縮的語言 ..................................................................... 2
1.2 是什么讓Scala能屈能伸 ............................................................. 7
1.3 為什么要用Scala .......................................................................11
1.4 Scala尋根 ..................................................................................... 17
1.5 結(jié)語............................................................................................. 19
第2章 Scala入門 ....................................................................................20
第1步 使用Scala解釋器 ..................................................................... 21
第2步 定義變量................................................................................. 22
第3步 定義函數(shù)................................................................................. 24
第4步 編寫Scala腳本 ......................................................................... 26
第5步 用while做循環(huán);用if做判斷 .................................................... 27
第6步 用foreach和for遍歷 ................................................................. 30
結(jié)語...................................................................................................... 32
第3章 Scala入門(續(xù)) ..........................................................................33
第7步 用類型參數(shù)化數(shù)組.................................................................. 33
第8步 使用列表 ................................................................................. 38
第9步 使用元組 ................................................................................. 42
第10步使用集和映射 ........................................................................... 43
第11步 識(shí)別函數(shù)式編程風(fēng)格 ............................................................. 48
第12步 從文件讀取文本行 ................................................................ 51
結(jié)語...................................................................................................... 55
第4章 類和對(duì)象 ......................................................................................56
4.1 類、字段和方法........................................................................... 56
4.2 分號(hào)推斷...................................................................................... 61
4.3 單例對(duì)象...................................................................................... 62
4.4 Scala應(yīng)用程序 ............................................................................. 65
4.5 App特質(zhì) ....................................................................................... 68
4.6 結(jié)語 ............................................................................................. 68
第5章 基礎(chǔ)類型和操作 ............................................................................69
5.1 一些基礎(chǔ)類型 .............................................................................. 69
5.2 字面量.......................................................................................... 70
5.3 字符串插值 .................................................................................. 77
5.4 操作符即方法 .............................................................................. 78
5.5 算術(shù)操作...................................................................................... 81
5.6 關(guān)系和邏輯操作........................................................................... 83
5.7 位運(yùn)算操作 .................................................................................. 85
5.8 對(duì)象相等性 .................................................................................. 86
5.9 操作符優(yōu)先級(jí)和結(jié)合性 ............................................................... 88
5.10 富包裝類.................................................................................... 91
5.11 結(jié)語............................................................................................ 91
第6章 函數(shù)式對(duì)象 ...................................................................................93
6.1 Rational類的規(guī)格定義 ................................................................. 93
6.2 構(gòu)建Rational ................................................................................ 94
6.3 重新實(shí)現(xiàn)toString方法 .................................................................. 96
6.4 檢查前置條件.............................................................................. 97
6.5 添加字段...................................................................................... 98
6.6 自引用.........................................................................................100
6.7 輔助構(gòu)造方法 .............................................................................101
6.8 私有字段和方法..........................................................................102
6.9 定義操作符 .................................................................................104
6.10 Scala中的標(biāo)識(shí)符 .......................................................................106
6.11 方法重載 ...................................................................................108
6.12 隱式轉(zhuǎn)換...................................................................................111
6.13 注意事項(xiàng)...................................................................................112
6.14 結(jié)語 ..........................................................................................112
第7章 內(nèi)建的控制結(jié)構(gòu) .......................................................................... 114
7.1 if表達(dá)式 ......................................................................................115
7.2 while循環(huán) ....................................................................................116
7.3 for表達(dá)式 ....................................................................................119
7.4 用try表達(dá)式實(shí)現(xiàn)異常處理 ..........................................................125
7.5 match表達(dá)式 ...............................................................................129
7.6 沒有break和continue的日子 ........................................................131
7.7 變量作用域.................................................................................134
7.8 對(duì)指令式代碼進(jìn)行重構(gòu) ..............................................................137
7.9 結(jié)語 ............................................................................................139
第8章 函數(shù)和閉包 .................................................................................140
8.1 方法 ............................................................................................140
8.2 局部函數(shù).....................................................................................142
8.3 一等函數(shù).....................................................................................144
8.4 函數(shù)字面量的簡(jiǎn)寫形式 ..............................................................147
8.5 占位符語法 .................................................................................147
8.6 部分應(yīng)用的函數(shù)..........................................................................149
8.7 閉包 .................................................................

本目錄推薦

掃描二維碼
Copyright ? 讀書網(wǎng) m.ranfinancial.com 2005-2020, All Rights Reserved.
鄂ICP備15019699號(hào) 鄂公網(wǎng)安備 42010302001612號(hào)