Skip to content

Commit

Permalink
Fix headings to properly format
Browse files Browse the repository at this point in the history
  • Loading branch information
OBenjaminT authored Aug 18, 2020
1 parent 6412a5f commit 7515b8b
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions THOUGHTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ Some thoughts about Hedy design
This document contains some design decisions and corresponding thoughts for future reference.
It is mainly Felienne's internal monologue, but feel free to read along!

##General thoughts
###Fix or warn or break?
## General thoughts

### Fix or warn or break?

Several issues in code can be fixed, in fact this is one of the main benefits of Hedy I would say.
This does lead to the fact that decision need to be made for each case whether we silently fix, warn or break.
For example, starting a line with a space. Do we allow it? It is important for kids to realize at one point that in Python and thus in Hedy
Expand All @@ -14,11 +16,11 @@ Same question could be asked for case sensitivity of keywords. Do we allow it, a
I am still deciding.


##Thoughts per level
## Thoughts per level

###Level 2
### Level 2

####Use of spaces
#### Use of spaces

In Level 2, print now needs one space:
```command: "print " (" " | text | punctuation | list_access)* -> print```
Expand All @@ -30,7 +32,8 @@ Also in Level 2, ```print hello world!``` works, but prints "hello world!".
I am not sure I like this behaviour. On the one hand side, this is a nice extra reason why we want quotation marks, to be able to tell Hedy that you really want spaces.
On the other hand, it breaks the promise that we literally print what is behind the keyword print.

####Punctuation
#### Punctuation

The level 2 grammar has a separate rule for punctuation: ? ! and .
This is the case because we want to be able to print variables followed by punctuation without a space:
For example this code:
Expand All @@ -40,9 +43,10 @@ print hello name!`

should result in "hello Felienne!" and not "hello Felienne !"

###Level 3
### Level 3

#### Quotes only in print

In Level 3, we introduce the use of quotation marks in the `print` statement. In `ask`, this is not needed.
The reasoning for this is that `print` is a 'real' statement which will occur in Python too and we want to build up to that.
`ask` will be replaced by a function call later on and as such does not really need to be real.
Expand Down

0 comments on commit 7515b8b

Please sign in to comment.