Funny programming language in snap! (Part 2)

Terminal Commands, these run with the "program itself" as an a object.

Create Variable "string" with (value) -- Creates a variable

display(value) -- sort of like the print command in python or console.log in JS

wait (value) sec -- You know what this is, simply pause 1 second

make Object called "string" -- Makes a sprite appear at x:0 y:0, it appears as a TURTLE.

Change (variable name) to (value)

set (object name) to (picture)

do [  -- The Old REPEAT BLOCK
    //code
] 10 times

Object Commands, these run with the Object in mind.

tell "object name" to [
     //code
] --Tells object to do this.

go to 0, 0, -- go to x, y

pen("down or up") -- Toggles Pen

//what more could I do?
switch pen status
pen down // reports if the pen is down

also if there's

tell object to [
//code
]

then there should be

ask object for (stuff goes here)

also variables are like this

create the variables ($var, $var2)
set $var to 6
set $var2 to 8
set $sum to $var + $var2
write $sum with new line

oh yea

wait 1 sec

should be

sleep 1 sec

repeat is good
but

change $varname to thing
// is just the same as
set $varname to thing
//do you mean
change $varname by 2

make object called "sprite"
should be

make an object called "sprite name"

without the an, it wouldn't be englishy

I am trying to balance between being englishly and being easy to type commands. you can anyways still read it and it would make sense.

I mean actually do mean

change "var name" to thing,

btw.

oh, i thought that you were talking about

change $var by 2

Why would variables need a dollar sign? It also makes more sense to create each variable separately. There is a reason why both python:

var1 = 1
var2 = 2

and JS:

var var1 = 1;
var var2 = 2;

both need to make the vars separately. It just makes more sense and

create the variables ($var, $var2)

would be ungrammatical if you only needed one variable.

create the variables ($var)

the dollar sign is very useful

1 reports 1 right? what if we created a variable called 1 and set it to 2?
1 would report 1 and $1 would report 2. The dollar sign is to let the computer know that it is a variable

JS doesn't:

var var1 = 1,
    var2 = 2,
    var3 = 3;

sorry but I am new to JS.

oh yea and the

create the variables ($var)
//is to make multiple variables at once
create the variables ($var, $var2, $var3)

but i kind of agree we could have

create the variable $var
//unless if you need to make multiple variables at once

Yeah, That makes sense but why not block the user from creating variables that have names equal to numbers, that makes a lot of sense because saying

1 = 2

is not possible, so when that happens we just make the error

Error : An variable was named a number at line ___

It will restrict the permissions a little but it may confuse some users about if you say 1. the program assumes it is 2.

ah come on. the

$var

is to say that it is a variable, i don't want to make it have limits on just creating variables

Yeah but my idea makes more sense.

For example, Python does this when I try to make a variable named 1 equal 2.

yea but in Snap! you CAN create a variable called 1, i want it to be the same.

How will it handle variable names with spaces?
I suggest using brackets or something to signify variables:

create script var [1]
display [1]
create script var [1 hello world]
display [1 hello world]

As for the loops, I think the do ... end/done system might work better. It's more englishy than using brackets for that, and won't get confused with the variable getters. You could say that about this variable system, but something like this is basically required to support all ways to write variables.
But if you really want the loops to still have brackets, maybe put 2 brackets around them instead of 1:

repeat [[
do some stuff lol
]] for 10 times

That does make a lot of sense.
But it still should not be possible to make variables names numbers.

Why not?

$ is more easier, also the

[1]

reminds me of arrays

ok fine i will use the

do

done

four brackets for one loop look strange

doesn't work for spaces

display $hello world

In this syntax, it's very clear that $hello and world are different identifiers.

Maybe we could combine the two ideas and make this:

display $[hello world]

why not just use _ instead of space?