- Capable of treating lines of code as commands to execute programs or open resources (like in DOS and Bash)
- Suited for operating on streams like Perl
- Very easy to parse, with a small set of reserved keywords
- Supports parallelism and concurrency
- Supports capturing signals for exceptions and events
Code: Select all
call BuildFile 1
on Done
out "Finished."
hang
do : BuildFile
{
if $1 = 1 then
do
{
gcc /o test1 test1.c
}
else if $1 = 2 then
do
{
gcc /o test2 test2.c
}
else if $1 = 3 then
gcc /o test3 test3.c
}
Another idea I had is that all 'call' instructions should fork into separate threads if possible. An 'on' instruction would be used to capture signals, similar to a 'comefrom' instructions. A 'hang' instruction suspends execution indefinitely, only listening for signals. Think of it as the complete opposite of a 'call' instruction. Rather than "going [to a label] and coming [back to the return place]" it's "coming [back to itself] and going [to a signal handler]".
I've never seen any other programming language handle functions like this myself, but it's probably nothing new. Does anyone else know a language that does something similar which I can look at for ideas? Also, what is your opinion? Would you use it if you had the choice or throw holy water at it?