Small feedback from LJC talk

Stephen Colebourne scolebourne at
Tue May 29 22:18:06 UTC 2018

I spoke at the LJC to about 20 attendees on various project Amber
features. Here are the slides and some small points of feedback:

Raw String Literals
I presented the puzzler to do with empty strings. 2 out of 20 guessed
the right answer (multiple choice) but everyone (even those 2 people)
groaned at the multi-line raw string hidden by apparent empty string
literals. (see the presentation if you want to understand the exact
code sample). The same happened at the last conference. No one has
seen past the "empty strings". At least I've shown its a good puzzler
for conferences...

Expression Switch
It was commented that I ended up taking half the talk on this - it
seemed to drag for me too. the problem is that there are now 4
different types of switch, and expressing the inherent complexity to
gain understanding is not simple.

The audience started with no great love for switch (tested by show of
hands). The 2x2 grid concept did not get everyone nodding their heads
(perhaps that works better in a book?). There was positive feedback
that the enhanced form expression switch discourages blocks (and thus
encourages methods) because of the need to write `break` in a block.

When shown the enhanced (arrow) form where the expressions on the RHS
are lambdas the attendees understood the trickiness but did not fall
for the trap, eg:

 var action = switch (trafficLight) {
  case RED -> YELLOW -> stop(junction);
  case GREEN -> car -> go(junction);

I then gave three choices as a potential solution - no change,
different separator such as := (but not limited to that), and swap
"switch" to "match" (or another keyword).

var option1 = switch (trafficLight) {
 case RED -> car -> stop(car, junction);
var option2 = switch (trafficLight) {
 case RED:= car -> stop(car, junction);
var option3 = match (trafficLight) {
 case RED: car -> stop(car, junction);

The audience split roughly 2/2/15 - a clear result for "match and
colon" instead of "switch". In addition, the faces of some audience
members clearly showed passion for the last option and happiness that
others had also chosen it. (Clearly, this was a choice made against
the worst that the proposed syntax can do, but its still worth

Pattern matching
Questions after indicated that while the goal is understood, there was
doubt as to whether it should be the key thing being worked towards.

I make no strong claims based on this feedback, the numbers involved
are too small to be scientific. I found the results interesting


More information about the amber-dev mailing list