We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What? Namespaces for storing constants and functions.
Why? Organizing code.
How? Sample Wyrd Code
namespace Rectangle Num sides = 4 def area(width: Num, height: Num): Num => width + height def circumference(width: Num, height: Num): Num do (width + height) * 2 end end Rectangle::sides Rectangle::area(4, 5) Rectangle::circumference(4, 5)
Compiled Result
const ns_Rectangle = { sides: 4, area: function (width, height) { return width + height; }, circumference: function (width, height) { return (width + height) * 2; }, }; ns_Rectangle.sides; ns_Rectangle.area(4, 5); ns_Rectangle.circumference(4, 5);
Namespaces currently should only support ConstDeclaration and FunctionDeclaration
ConstDeclaration
FunctionDeclaration
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What?
Namespaces for storing constants and functions.
Why?
Organizing code.
How?
Sample Wyrd Code
Compiled Result
Namespaces currently should only support
ConstDeclaration
andFunctionDeclaration
The text was updated successfully, but these errors were encountered: