Skip to content

Commit 5880ab1

Browse files
Accessible Scala: more text to explain the problem + fix typos
1 parent 1478851 commit 5880ab1

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

blog/_posts/2018-06-13-accessible-scala.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,42 @@ title: Introducing Accessible Scala
77

88
Scala is proudly a welcoming environment for all. The Scala Center is demonstrating this by supporting
99
the development of Accessible Scala, a tool for blind and partially-sighted developers (see [SCP-016]).
10-
One of its goals is to remove the noise introduced by various delimiters. For example, we could read the
11-
following expression: `class S[+T]` as `class S parameterized with covariant T`. Since there is more than one way
12-
to pronounce Scala source code, we are open to the community proposition. You can find an extensive test case
10+
One of its goals is to remove the noise introduced by various delimiters. The current solution with
11+
text-to-speech engine, would read
12+
13+
```scala
14+
def foo[A: Wibble](s: String, b: Wobble[A]): Int = ...
15+
```
16+
17+
as
18+
19+
```bash
20+
def space foo open square bracket capital s colon space
21+
wibble close square bracket open bracket a colon space
22+
string comma space b colon space wobble open square bracket
23+
capital a close square bracket close bracket colon
24+
space Int space equals space ...
25+
```
26+
27+
Indeed such a description is necessary to enable precision editing.
28+
29+
However, the following would convey the same information more efficiently:
30+
31+
```bash
32+
def foo parameterized with: A context bounded by: Wibble. s String, b Wobble of A returns: Int
33+
```
34+
35+
Since there is more than one way to pronounce Scala source code, we are open to the community proposition. You can find an extensive test case
1336
here: [DescribeTest.scala]. If you find that descriptions could be improved, send us a pull request with the
1437
expected form.
1538

16-
Reading Scala out loud make some of its syntactic elements less intimidating for beginners. There is no more
17-
need to mentally associate the syntax `+T` with its concept `co-variant`. Notice on the example above, how the type parameter delimiters: `[` and `]` are absent from the verbal description. It call also help sighted developers to describe Scala orally, for example in the context of pair programming. However, when expressions get more complex, the audible form can become ambiguous or difficult to decypher.
39+
Reading Scala out loud make some of its syntactic elements makes it less intimidating for beginners. There is no more
40+
need to mentally associate the syntax `+T` with its concept `co-variant`. Notice in the example above, how the type parameter delimiters: `[` and `]` are absent from the verbal description. It can also help sighted developers to describe Scala orally, for example in the context of pair programming. However, when expressions get more complex, the audible form can become ambiguous or difficult to decipher.
1841

1942
To overcome the limitation of verbal description, we created a technique called the Cursor. The idea is simple:
2043
from your cursor location, you can navigate the abstract syntax tree of the source code. From a node, you can
2144
navigate to the parent node, to the siblings (left or right) or the first child. As you navigate the code,
22-
it's described verbally and selected. Here is an illustrated example, the arrows (→ exp ←) repesents the highlighted text and <kbd>Alt</kbd> + <kbd>Arrow</kbd> the keyboard shorcut applied to navigate.
45+
it's described verbally and selected. Here is an illustrated example, the arrows (→ exp ←) represents the highlighted text and <kbd>Alt</kbd> + <kbd>Arrow</kbd> the keyboard shortcut applied to navigate.
2346

2447
```
2548
@@ -49,7 +72,7 @@ technique and hear the descriptions.
4972

5073
# Want to try it?
5174

52-
We created an [online demo]. You can try it now! (Tip: It works best on google-chrome! )
75+
We created an [online demo]. You can try it now! (Tip: It works best on Google Chrome! )
5376

5477
We also created a [vscode extension], so you can try on your project. Search for `Accessible Scala` in the
5578
extension manager

0 commit comments

Comments
 (0)