3 ms·
I had the same reaction to that screenshot. The use of parentheses and dots is very scary, though as a programmer I can make guesses as to why they are there. I
by jdmichal 9y ago
I had the same reaction to that screenshot. The use of parentheses and dots is very scary, though as a programmer I can make guesses as to why they are there. Is there any reason the syntax couldn't have looked like this instead?
move up
move left
move up
move left
set
I mean, after all, that's exactly the "syntax" of the replacement icons!
Yes, it will probably make your parser more difficult. Yes, for this use case, it's probably worth it. I'm guessing that a game targeted to 5-year-olds won't have such complex nested logic that you can't write a simple DSL like the above.
- msla 9y agoNo huge reason. It is, after all, pretty much what Logo looked like: http://www.calormen.com/jslogo/ http://www.calormen.com/jslogo/ Logo was explicitly designed to teach programming, and is pretty much Lisp with a different (and not that different) syntax. You could probably push Logo even further along the "natural language" axis, but I think that's too brittle: It's too easy to come up with constructions which look like they should work, but fail in a completely opaque fashion. A better plan would be to improve the tooling, to give kids editors which know the language and can provide templates to prevent people from entering invalid syntax. Brad Templeton's ALICE Pascal was an example of this syntax-directed editing. http://www.atarimagazines.com/v6n2/Alice.html http://www.atarimagazines.com/v6n2/Alice.html http://www.templetons.com/brad/alice.html http://www.templetons.com/brad/alice.html These days, we could wire in an extensive help system, complete with discussion fora and examples, to specific syntactic constructs and function calls. You know, like how Programming Professionals use StackOverflow.