Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoclose quotes #263

Open
alecmolloy opened this issue Nov 13, 2015 · 3 comments
Open

Autoclose quotes #263

alecmolloy opened this issue Nov 13, 2015 · 3 comments

Comments

@alecmolloy
Copy link
Contributor

When a user types text "hello world". They won't be able to see anything they have written until it is completed because their quotes are unclosed. This could be resolved by having a closing quote appear when any opening quote is typed.

@alex5imon this would help specifically for an early techjam Make Art challenge.

@rcocetta
Copy link
Contributor

Sorry for jumping in now. I didn't know we were actively working on implementing this.

I'm really worried about this functionality for 2 reasons:

  • Lots of IDEs implement it, most of the time it doesn't work the right way. Not even Sublime (that as you know I consider the king of text editors)
  • I don't think it's right to teach to use a system that autocompletes your quotes. If you have a syntax error, you have a syntax error.

@alecmolloy
Copy link
Contributor Author

@rcocetta i rather enjoy debating this subject with you.

  1. What in your view is the best way to implement this? I haven't thought too much about this beyond: "I want users to be able to see the text they are typing as they type it."
  2. Syntax errors are death to early learners, and are a nuisance to advanced users. Our job is not to teach a language, it is to teach computational thinking and intuitions about computers.

@rcocetta
Copy link
Contributor

  1. I don't have a good solution to be honest. The problem is:
  • If you're a very beginner, you might struggle even in understanding why you should use quotes at all. See Below
Riccardos-MBP:kano-draw rcocetta$ echo This is still a sentence
This is still a sentence
  • If you're a bit more advanced you might already type pairs of quotes or brackets, in which case Sublime and I think Eclipse, add 2 double quotes the first time you type and just override the 2nd one when you type again (try it). As soon as you start doing something more complex with quotes, you're in trouble because the editor tries to anticipate what you're doing and you have to either delete or retype stuff.
  • The only case in which you're helped is if you understand why you need the quotes, but you forget to add the closing one.

You see what you type while you're typing in the editor, but you see the result of your instruction once you wrote a proper instruction.

  1. I believe that getting the right syntax (independently of the language) is part of computational thinking, because it expresses a way to organise your thoughts in itself.

When for the 1st time I was properly taught programming, I was taught the concept of instruction and that was always broken down in syntax and semantic: we literally had a table like:

| instruction | syntax | semantic |

I really think you need to know that for a computer to understand what you're saying, you have to say it the right way, and in this we shouldn't help who's learning and forgets to close double quotes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants