{ like the vegetable. }
Radish's website provides in-depth instructions on how to install Radish to your computer based on the OS. If you're using this repository on MacOS, there's also an install.sh file that runs the scripts necessary (use sudo bash install.sh to grant admin permissions, as the file needs access to usr/local).
Radish is an easy-to-learn, object-oriented programming language written in C#. If you know JavaScript, you know Radish. However, Radish has a few of its own quirks to keep in mind (don't ask why these exist)
- To declare a variable, use "dig" or just "d"
Example: dig name - To set the value of a variable, use "plant" or "p"
Example: dig name plant "Theo" - Radish currently supports only multiline comments, just start and end your comment with #
Example: # this is a comment #
As a side note, Radish is completely linebreak blind. That's right, no semicolons. You can write as many statements on the same line as you want! - Functions are declared using either "tool" or "t"
Example: dig sayHi plant tool(name) { holler(name) }
Oh yeah, forgot to mention that the print function is called holler. - There are a few other details, but you'll get used to them along the way.
dig FunkyList plant class {
dig stored
dig constructor plant tool(arr) {
this.stored plant arr
}
dig get plant tool(index) {
if(index % 2 == 1) { # for odd numbered requests #
harvest "no list element for you"
}
harvest this.stored[index]
}
dig push plant tool(val) {
this.stored.push(val)
}
}
dig li plant new FunkyList([1, 2, 3])
holler(li.get(0)) # output = 1 #
holler(li.get(1)) # output = no list element for you #
holler(li.get(2)) # output = 3 #
li.push("list element please")
holler(li.get(3)) # output = no list element for you #
holler(li.get(4)) # error #
Good luck on your journey with Radish!
TODO
- Add syntax for class to class inheritance // DONE
- Add syntax to call inherited constructor // DONE
- Add more prototype class functions, such as array.pop() // DONE (sort of)
- Introduce getter functions, so that array.length can be called instead of array.length() // DONE
- Add tags for object/class properties, such as static, public/private/protected, etc // DONE
- Farm theme! // DONE
- Better debugging! Literally it's so bad // DONE
- Add manual exception throwing + try/catch syntax // DONE
- Make VSCode extension so that the code doesn't look so bland (also cool file symbol) // ALMOST DONE
- Add importing/exporting from other files!!! // DONE
- Package it so that users can install radish and run files without seeing all of the machinery // DONE
- async??