Just so you guys now, you can vote and support this here:http://suggest.scratch.mit.edu/forums/6 … ed-scratch
Offline
I support
Offline
This is a brilliant idea, especially for speed — both eliminating lag and as typing is faster — and for copy/pasting scripts. Much better than trying to use the "blocks" on the forums
About syntax: people seem to be suggesting using [square brackets] or {curly brackets} to show where blocks like "if" or "when" start and end. I think this is very un-Scratchlike, and — although this would presumably be a hidden feature — it feels too complicated to me.
Someone suggested a syntax more like Python. In Python, indentation is used to show where blocks start and end, rather than curly brackets {}. For example:
when green flag clicked: wait 0.25 secs switch to costume "cat" broadcast "message" and wait if MessageDone == 1: item = 0 add Item to SomeList else: say "hi"
I think a syntax more like this, or something like Applescript, would be easier and more readable. If we're trying to bridge the gap between text-based languages and Scratch, it needs to be as easy as possible.
Last edited by blob8108 (2011-10-28 17:18:33)
Offline
blob8108 wrote:
This is a brilliant idea, especially for speed — both eliminating lag and as typing is faster — and for copy/pasting scripts. Much better than trying to use the "blocks" on the forums
![]()
About syntax: people seem to be suggesting using [square brackets] or {curly brackets} to show where blocks like "if" or "when" start and end. I think this is very un-Scratchlike, and — although this would presumably be a hidden feature — it feels too complicated to me.
Someone suggested a syntax more like Python. In Python, indentation is used to show where blocks start and end, rather than curly brackets {}. For example:Code:
when green flag clicked: wait 0.25 secs switch to costume "cat" broadcast "message" and wait if MessageDone == 1: item = 0 add Item to SomeList else: say "hi"I think a syntax more like this, or something like Applescript, would be easier and more readable. If we're trying to bridge the gap between text-based languages and Scratch, it needs to be as easy as possible.
That's true, but it isn't supposed to bridge the gap, it's supposed to be a complicated extension that will bring out the best of scratch to those who know how to use it. We shouldn't be making compromises to make it easier, because it's designed to be efficient and faster to program, not easier. I like your Python-like indentations, but I think you should also have brackets as well, to make things clearer to see.
Last edited by Optimax-DJ (2011-10-29 09:51:10)
Offline
Optimax-DJ wrote:
That's true, but it isn't supposed to bridge the gap, it's supposed to be a complicated extension that will bring out the best of scratch to those who know how to use it. We shouldn't be making compromises to make it easier, because it's designed to be efficient and faster to program, not easier. I like your Python-like indentations, but I think you should also have brackets as well, to make things clearer to see.
I agree with you — the point of having a text-based view is that we don't want to have to compromise on speed and power (typing) to make programming easier (dragging 'n' dropping blocks).
But having curly brackets or not doesn't compromise the power of the lanuage — it's just a question of syntax. You can write complicated programs in both PHP and Python; the fact that PHP has curly brackets, and Python doesn't, doesn't make a difference. It's much more a matter of personal preference.
In fact, I find Python code much more readable and clearer to see than other languages — making it faster and easier to write complicated programs!
Last edited by blob8108 (2011-10-29 12:21:55)
Offline
blob8108 wrote:
Optimax-DJ wrote:
That's true, but it isn't supposed to bridge the gap, it's supposed to be a complicated extension that will bring out the best of scratch to those who know how to use it. We shouldn't be making compromises to make it easier, because it's designed to be efficient and faster to program, not easier. I like your Python-like indentations, but I think you should also have brackets as well, to make things clearer to see.
I agree with you — the point of having a text-based view is that we don't want to have to compromise on speed and power (typing) to make programming easier (dragging 'n' dropping blocks).
But having curly brackets or not doesn't compromise the power of the lanuage — it's just a question of syntax. You can write complicated programs in both PHP and Python; the fact that PHP has curly brackets, and Python doesn't, doesn't make a difference. It's much more a matter of personal preference.
In fact, I find Python code much more readable and clearer to see than other languages — making it faster and easier to write complicated programs!![]()
Yeah, if you properly format your code, curly braces make almost no differences in a language. They're much more important to the way the language is interpreted than the way it's read by a programmer, in fact. In Python, indentations (more accurately, white space) actually tell the interpreter in which loop or block of code the line is contained. In languages with braces, the white space makes no difference, and it's actually the braces that tell the compiler that. (For example, in Java, you needn't use any white space if you so want - you could write an entire program on one line.)
Offline
text scratch
shouldn't you pick up lua, C++, or java instead?
i mean that's essentially what it is just different in a way
Offline
roijac wrote:
Harakou wrote:
For example, in Java, you needn't use any white space if you so want - you could write an entire program on one line.
you can also do that in python. but it's not as easy as in java or C
![]()
I'm not sure you can actually do that, unless it's a really simple program. The language is designed to prevent you doing something like that, I think...
Last edited by blob8108 (2011-10-30 05:20:33)
Offline
Harakou wrote:
Yeah, if you properly format your code, curly braces make almost no differences in a language. They're much more important to the way the language is interpreted than the way it's read by a programmer, in fact. In Python, indentations (more accurately, white space) actually tell the interpreter in which loop or block of code the line is contained. In languages with braces, the white space makes no difference, and it's actually the braces that tell the compiler that. (For example, in Java, you needn't use any white space if you so want - you could write an entire program on one line.)
Yes, this is true. But assuming they're both formatted nicely - and we can assume they will be, as we'd probably want a "clean up" function, similar to the scripts, that tidies up the code - then how the interpreter works makes no difference; so it's really down to which you prefer.
Last edited by blob8108 (2011-10-30 05:26:07)
Offline
Lightnin wrote:
Interesting discussion, and I'm glad to see some folks are fans of python. That's what the front-end of Scratch 2.0 will be written in.
![]()
Awesome! By the way, if Scratch 2.0 is Flash based and is in the cloud, will I be able to run it with my Solaris machine?
Last edited by Optimax-DJ (2011-10-31 12:52:45)
Offline
Lightnin wrote:
Interesting discussion, and I'm glad to see some folks are fans of python. That's what the front-end of Scratch 2.0 will be written in.
![]()
I'm really excited to hear that! Presumably, that will make modding /much/ easier — or wait, if that's just the front-end; how are the other parts integrated?
Does the Python code run on the server, or is it part of a downloadable version of Scratch? If it is server-side code, what web framework are you using? (:
Last edited by blob8108 (2011-10-31 15:25:47)
Offline
O____________o
The fancy code confuses me.
Nice job though, guys
Offline
spongebob123 wrote:
The fancy code confuses me.
What do you mean by "fancy"? (:
Offline
I like it, but I don't have any votes left.
Offline
I support.
Offline
Great idea! Searching for the right block is really annoying. But, if you even misspell one word, the script wont work. I guess that's why scratch team didn't make scratch text based. But maybe this could work...
Offline
What about we use the same syntax for the new scratchblocks tag, but with the bugs in it fixed? I'd find that a great idea!
EDIT: Sorry for necroposting, I got here from another topic.
Last edited by rdococ (2012-01-29 06:37:23)
Offline
it should have the same syntax as the new [scratchblocks] tag in the forums and wiki.
Offline
joefarebrother wrote:
it should have the same syntax as the new [scratchblocks] tag in the forums and wiki.
I said that.
Offline
rdococ wrote:
joefarebrother wrote:
it should have the same syntax as the new [scratchblocks] tag in the forums and wiki.
I said that.
Sorry, I don't read EVERY post before posting.
Offline