Auto-indent changes at http://code.world

14 views
Skip to first unread message

Chris Smith

unread,
Sep 2, 2019, 5:42:42 PM9/2/19
to codeworl...@googlegroups.com
Hello everyone,

The following applies ONLY to http://code.world, the educational dialect of CodeWorld.  If you use the Haskell dialect at http://code.world/haskell, then you can ignore this message.

The last few weeks, I've been working on tackling the problem of parse errors due to students forgetting or accidentally indenting things.  This is one of the biggest challenges that students face as they get started with CodeWorld, and I can see in analyzing students' errors in practice thatr parse errors due to incorrect indentation make up around 20% of error messages students grapple with.

My intent is that, as of my latest changes, students can type an entire program in CodeWorld without ever adding an explicit indent to a line.  The CodeWorld editor should be indenting for them whenever it is needed.  Occasionally, (in particular if they use `where` clauses on functions) it is necessary to remove an indent, and I've ensured that Backspace is good enough to do so, and erases the entire indent at once so that the student is returned to a valid indent level.

I'm interested in feedback on the result.  In particular, if you have specific cases where the indentation chosen by the editor is egregiously bad, I'd like to know about it so that I can fix it.  The goal isn't for CodeWorld to match your favorite preferred coding style, but if something is awful, or especially if the default indentation doesn't compile and you need to change the indent for your code to build, then I'd definitely like to hear about it.

You can respond to this thread, or open an issue at http://github.com/google/codeworld with the code that causes the problem.

Thanks in advance for any feedback!

Chris
Reply all
Reply to author
Forward
0 new messages