hedyorg / hedy

Hedy is a gradual programming language to teach children programming. Gradual languages use different language levels, where each level adds new concepts and syntactic complexity. At the end of the Hedy level sequence, kids master a subset of syntactically valid Python.
https://www.hedy.org
European Union Public License 1.2
1.27k stars 282 forks source link

Reserved words: unclear situation (level 2) #38

Closed arjenpdevries closed 4 years ago

arjenpdevries commented 4 years ago

Boys love cars. But car in Dutch is auto. Using auto in your program causes errors.

Felienne commented 4 years ago

Girls can also love cars :) (although I don't)

But yeah I did not think of Python keywords in programs! What type of issues does this cause exactly, at what level? I tried:

auto is ask Wat is je lievelingskleur? print auto

At level 2 and 3 and that works without issues.

arjenpdevries commented 4 years ago

Natuurlijk! Maar dit was een jongen :-)

Misschien zat er toch een ander issue in - ik kan het niet reproduceren nu.

Het was rond 12.45, en het eerste programma had auto en het tweede programma auto vervangen door car - de 1e werkte niet en de 2e wel. Meer info heb ik helaas niet, sorry!

(Oh and should have been in English, apologies!)

Felienne commented 4 years ago

Ah tijd helpt, dan ga ik m even opzoeken in de logs. Het kan zijn het dat per ongeluk gefikst is door andere wijzigingen, maar het punt over keywords als variabelen blijft staan als issue (moet ik nog even over nadenken hoe we dat kunnen oplossen)

arjenpdevries commented 4 years ago

Toch nog een probleem! (Niet real-life in dit geval. Maar s/for/f/g en het werkt.)

image

Felienne commented 4 years ago

Nou het auto probleem heeft me lang bezig gehouden :)! Dat bleek niks met keywords van toen te hebben maar met Unix line breaks!

image

Dus dat wordt nu een nieuw issue, maar door jouw opmerkingen ondersteunen we nu wel keywords as variabelenaam :)

Felienne commented 4 years ago

Fixed by https://github.com/Felienne/hedy/commit/682ac0a738e1fecd4e71eea202ee1541d932fbaf

arjenpdevries commented 4 years ago

Wow nice collapse :-) great find too