I just fixed a bug in Sea of Words...which hopefully means it's a little more trustworthy.
It seemed like a good time to add the ECHO feature I've talked about.
>> echo It's this feature, which I've described in the past.
It's this feature, which I've described in the past.
ECHO is a variadic function which processes what you pass it to the end of line. If you prefer, you can also use a BLOCK!.
>> echo [A block allows
you to put an arbitrary number
of newlines]
A block allows you to put an arbitrary number of newlines
>> echo [Or two echos] echo [on the same line]
Or two echos
on the same line
There is a variable substitution mechanism so you can use @ to point out variables or expressions.
>> x: 10
>> echo The value is @x
The value is 10
>> echo The doubled value is @(x * 2)
The doubled value is 20
It's Shorter!
Can't argue against that.
print ["You have written" num-lines "lines of code."]
echo [You have written @num-lines lines of code.]
echo You have written @num-lines of code.
The API Benefits
Not needing quotes helps API calls:
rebElide("print [{You have written}", num_lines, "{lines of code.}]");
rebElide("echo [You have written", num_lines, "lines of code.]");
rebElide("echo You have written", num_lines, "lines of code.");
It's the kind of change that opens up the choose-your-own-adventure of syntax to let you build a system more like bash, or less like bash. It's an important decoupling of the use of words from the creation of variables. So, onward.