Welcome
Wing Next is the current experimental version of Wing. Changes that occur between updates of Wing Next may render your code nonfunctional. Use Wing Next at your risk!
Wing is an open-source modern procedural programming language for desktop and mobile computing. It is meant to be fast, lightweight, and extremely extensible.
Almost anything can be made with Wing, and thanks to compatibility with JavaScript code, porting existing programs is just a breeze.
Wing makes your code easier to read and to debug. Unlike languages such as Java or Python, Wing is not object-oriented, meaning there is no such thing as classes or methods. All variables and functions are global.
Moreover, unlike languages such as Kotlin or Rust, Wing does not inherit the complicated syntax from C. Most actions in Wing are done with natural language and only a few symbols.
To get started with Wing, it is recommended that you try using Wing Creator. The Wing Creator application makes it easy to write Wing code, with syntax highlighting, autocompletion and syntax checking. You can learn Wing directly by using it.
This documentation contains details about using Wing with the built-in modules. While you can extend Wing by creating your own modules (or using existing ones), the built-in modules can generally help you get things done.
Below is a simple "Hello world" program written in Wing:
1
print Hello, world!
And this program makes use of basic features within Wing (namely functions, conditions, and variables):
Without comments
With comments
1
function hello
2
if defined $me do
3
print Hello, $me!
4
else do
5
print Hello, world!
6
end
7
end
8
9
$me = User
10
hello
Comments in Wing start with
--
1
-- We create a function named "hello", without parameters
2
function hello
3
if defined $me do -- We check if the variable $me is defined
4
-- We display "Hello, " followed by the contents of $me, and "!"
5
print Hello, $me!
6
else do -- If $me is not defined
7
-- We display "Hello, world!"
8
print Hello, world!
9
end
10
end
11
12
-- We set the $me variable to "User"
13
$me = User
14
-- We call the "hello" function. In this case, the $me variable is set (it was set in the line above) so it will display "Hello, User!"
15
hello
As you can see, code gets harder to read as it gets more complicated. This is why we recommend that you use Wing Creator, which has syntax highlighting for Wing.
To make good use of Wing, it is recommended that you understand how variables work, how to write conditions, how to run operations on variables, which functions Wing is capable of, and (if you want to write more complicated programs) how to bind JavaScript code to Wing.
Before going any further, you should also learn how to use Wing Creator, since it will make it way easier for you to use Wing and catch bugs.
Last modified 5mo ago