Skip to content

alkrobinson/Iteration3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iteration3- Chpt 8 - 11

This project is for learning scala from the book O'Reilly Programming Scala 2nd edition

Chapter 8

  • class and objects
  • reference and value types
  • value classes
  • Parent Types
  • Constructors
  • Fields
  • uniform access
  • unary methods
  • Validating input
  • Calling Parent Classes
  • Nested Types

Chapter 9

  • Traits
  • stackable traits
  • constructing traits
  • use traits to replace classes when it doesn't behave like a parent in most cases

Chapter 10

  • Parameterized Types (+T ? extends T, -T ? super T)
  • Variance of Mutable Types (only invariance allowed no sub or sup types)
  • Scala Type Hierarchy
  • Null is a subtype of AnyRef not AnyVal so no null ints
  • Products are useful in case classes to get fields and elements
  • Type definitions ( Map, Set, Function)
  • Condition Checking (assert, assume, require)
  • Input & Output Methods (print, printf, println, readBoolean readf, readf2, readf3)
  • Miscellaneous Methods (???, identity, implicityly)
  • Equality of objects (eq ,ne, sameElements methods)

Chapter 11

  • Overriding members of classes and traits (prevents mispelling and member name conflicts)
  • Don't override concrete members or final declarations
  • Overriding concrete and abstract methods and fields
  • Overriding abstract types
  • Linearization of objects (bind right to left)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages