diff options
Diffstat (limited to 'book/src/main/scalatex/book/indepth/JavaAPIs.scalatex')
-rw-r--r-- | book/src/main/scalatex/book/indepth/JavaAPIs.scalatex | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/book/src/main/scalatex/book/indepth/JavaAPIs.scalatex b/book/src/main/scalatex/book/indepth/JavaAPIs.scalatex index cecead8..0ad886d 100644 --- a/book/src/main/scalatex/book/indepth/JavaAPIs.scalatex +++ b/book/src/main/scalatex/book/indepth/JavaAPIs.scalatex @@ -35,4 +35,10 @@ @hl.scala{sun.misc.Unsafe} @p - And other similar APIs will either need to be rewritten to not-use them (e.g. @lnk("AtomicIntegers", "https://github.com/scala-js/scala-js/blob/master/javalib/src/main/scala/java/util/concurrent/atomic/AtomicInteger.scala") can be written without threading/unsafe APIs because Javascript is single-threaded) or can't be ported at all (e.g. @code{java.io.File})
\ No newline at end of file + And other similar APIs will either need to be rewritten to not-use them. For example, @hl.scala{AtomicXXXs} can be written without threading/unsafe APIs because Javascript is single-threaded, making the implementation for e.g. an @hl.scala{AtomicBoolean} pretty trivial: + + @hl.ref("output/scala-js/javalib/src/main/scala/java/util/concurrent/atomic/AtomicBoolean.scala") + + @p + Others can't be ported at all (e.g. @code{java.io.File}) simply because the API capabilities they provide (blocking reads & writes to files) do not exist in the Javascript runtime. + |