mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-17 02:45:07 +00:00
- Added documentation to some classes
- Created script provider system - Did some refactoring to improve the API
This commit is contained in:
1 parent
38b78ce305
commit
97c7f42400
50 files changed
+1311
-318
No files matched your search
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* <h1>ZenScript library</h1>
|
||||
*
|
||||
* The goal of ZenScript was to provide a scripting system that fit several
|
||||
* requirements:
|
||||
* <ul>
|
||||
* <li>Be usable by people without any prior programming knowledge, for simple tasks</li>
|
||||
* <li>Be usable for advanced tasks by experienced programmers</li>
|
||||
* <li>Integrate easily with Java classes</li>
|
||||
* <li>Provide sufficient syntax and libraries to integrate with its environment</li>
|
||||
* <li>Be clear and concise in its operation</li>
|
||||
* <li>Be typesafe, such that both small and large applications can be made with it</li>
|
||||
* <li>It should be efficient to run</li>
|
||||
* </ul>
|
||||
*
|
||||
* ZenScript originated from MineTweaker where I needed a simple programming
|
||||
* language that would allow users without programming knowledge to be able
|
||||
* to execute simple commands by following the tutorials for it.
|
||||
*
|
||||
* Originally MineTweaker had a simple one-line-at-a-time parsed scripting system,
|
||||
* but it quickly became clear that it wasn't flexible enough, so a simple parsed
|
||||
* language was created. This parsed language worked quite well but was very
|
||||
* inefficient as each value was wrapped into its own object. As I wanted to
|
||||
* expand the capabilities, this language was not very efficient.
|
||||
*
|
||||
* Additionally, it wasn't type-safe. There were no type definitions. On one hand,
|
||||
* this is handy, since I didn't want to bother people with types. Following the
|
||||
* tutorial was easy and the code was short. However, this gives a problem for the
|
||||
* more experienced user, wanting to go beyond the basic tutorials: what are these
|
||||
* values I'm working with, which properties does it have and which methods are
|
||||
* available no it? It's not clear.
|
||||
*
|
||||
* As a balance, ZenScript allows mixed typed and typeless behavior. You don't
|
||||
* need to define types anywhere - the compile will infer them where possible
|
||||
* and exhibit typeless behavior when the type is effectively unknown. In nearly
|
||||
* all the cases, the type is perfectly known and execution runs at native java
|
||||
* speed. Since there are types, they can be documented and enforced.
|
||||
*/
|
||||
|
||||
package stanhebben.zenscript;
|
||||
Reference in new issue
Block a user