Skip to content

Commit

Permalink
Fix 2 typos in OO-tradeoffs.Rmd (hadley#871)
Browse files Browse the repository at this point in the history
"is" to "if" and remove unnecessary "because". I assign the copyright in this edit to Hadley Wickham.
  • Loading branch information
jimvine authored and hadley committed Sep 15, 2017
1 parent 64168ae commit e3d3fb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OO-tradeoffs.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ knitr::include_graphics("diagrams/s4-matrix-dsparseMatrix.png", dpi = 300)

This domain is a good fit for S4 because there are often computational shortcuts for specific types of sparse matrix. S4 makes it easy to provide a general method that works for all inputs, and then provide a more specialised methods where the pair of data structures allow for a more efficient implementation. This requires careful planning to avoid method dispatch ambiguity, but the planning pays off for complicated systems.

The biggest challenge to using S4 is the combination of increased complexity and absence of a single source of documentation. S4 is a complex system and it can be challenging to use effectively in practice. This wouldn't be such a problem is S4 documentation wasn't scattered through R documentation, books, and websites. S4 needs a book length treatment, but that book does not (yet) exist. (The documentation for S3 is no better, but because the lack is less painful because S3 is much simpler.)
The biggest challenge to using S4 is the combination of increased complexity and absence of a single source of documentation. S4 is a complex system and it can be challenging to use effectively in practice. This wouldn't be such a problem if S4 documentation wasn't scattered through R documentation, books, and websites. S4 needs a book length treatment, but that book does not (yet) exist. (The documentation for S3 is no better, but the lack is less painful because S3 is much simpler.)

## R6 vs S3 {#s3-r6}

Expand Down

0 comments on commit e3d3fb0

Please sign in to comment.