|
| 1 | +--- |
| 2 | +layout: blog-detail |
| 3 | +post-type: blog |
| 4 | +by: Guillaume Massé |
| 5 | +title: Introducing Accessible Scala |
| 6 | +--- |
| 7 | + |
| 8 | + Have you found yourself where you had to verbally describe code? For example, while pair-programming |
| 9 | +or talking about work during lunch. Verbally describing code is not an easy task, fortunately for you the |
| 10 | +Scala Center is working on this. [SCP-016]: Accessible Scala, was submitted to provide industry-leading support |
| 11 | +for blind and partially-sighted developers. It's also an opportunity to formalize a spoken Scala. For example, |
| 12 | +how do you pronounce: `Map[K, V]`? Perhaps `Map of K V`, or maybe `Map taking K and V`. |
| 13 | + |
| 14 | + Reading Scala out loud make some of its syntactic elements less intimidating for beginners. When we read the |
| 15 | +following expression: `class S[+T]` as `class S parameterized with covariant T`, we don't need to mentally |
| 16 | +associate the syntax `+T` with its concept `co-variant`. |
| 17 | + |
| 18 | + One of the goals of the proposal is to remove the noise introduced by various delimiters. Notice how the type |
| 19 | +parameter delimiters: `[` and `]` are absent from the verbal description. However, with more complex expressions, |
| 20 | +this can make the audible form ambiguous, for example, with nested types: `Either[Wobble[T], Option[Wobble[S]]]` |
| 21 | +becomes: `Either applied to types Wobble of T, Option of Wobble of S`. |
| 22 | + |
| 23 | + To overcome the limitation of verbal description, we created a technique called the Cursor. The idea is simple: |
| 24 | +from your cursor location, you can navigate the abstract syntax tree of the source code. From a node, you can |
| 25 | +navigate to the parent node, to the siblings (left or right) or the first child. As you navigate the code, |
| 26 | +it's described and selected. We created an online demo (adjust your volume!) to let you try the cursor |
| 27 | +technique and hear the descriptions. |
| 28 | + |
| 29 | +# Want to try it? |
| 30 | + |
| 31 | +We created an [online demo]. You can try it now! (Tip: It works best on google-chrome! ) |
| 32 | + |
| 33 | +We also created a [vscode extension] so you can try on your project. Search for `Accessible Scala` in the |
| 34 | +extension manager |
| 35 | + |
| 36 | +# What's next? |
| 37 | + |
| 38 | +We hope you are excited as we are by the online demo. We would like to hear your feedback on the verbal |
| 39 | +descriptions. We would like to invite the Scala community to improve the quality of the project and join the |
| 40 | +effort. You can find an extensive test case here: [DescribeTest.scala]. If you find that descriptions could |
| 41 | +be improved, send us a pull request with the expected form. Another area where we would need help |
| 42 | +is to create an integration with [Emacspeak]. It's an emacs plugin widely used by blind developers. If you |
| 43 | +know emacs lisp well and want to participate, please reach out to us! |
| 44 | + |
| 45 | +# Talk to us! |
| 46 | + |
| 47 | +Thoughts or opinions about Accessible Scala? Join us over on [Scala Contributors] to contribute to the discussion. |
| 48 | +We also have a [gitter] channel. |
| 49 | + |
| 50 | +[SCP-016]: https://github.com/scalacenter/advisoryboard/blob/master/proposals/016-verbal-descriptions.md |
| 51 | +[vscode extension]: https://marketplace.visualstudio.com/items?itemName=scala-center.accessible-scala |
| 52 | +[online demo]: https://scalacenter.github.io/accessible-scala-demo/ |
| 53 | +[DescribeTest.scala]: https://github.com/scalacenter/accessible-scala/blob/master/tests/unit/src/test/scala/ch.epfl.scala.accessible/DescribeTest.scala |
| 54 | +[Emacspeak]: https://github.com/tvraman/emacspeak |
| 55 | +[gitter]: https://gitter.im/scalacenter/accessible-scala |
| 56 | +[Scala Contributors]: https://contributors.scala-lang.org/TBD |
0 commit comments