You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The identifiers starting with a dollar sign are not type-checked for obvious reasons. This approach is very simple and straight forward but it is very unsafe and can cause serious issues in large applications.
Volant needs a more safe and robust way of managing c addons. The specific details of how that system will work are not yet fully decided but here's a rough idea for how the addons will work,
import "header.h";
// defining a foreign type
typedef foreign a_type_defined_header;
// defining a foreign function
func foreign a_function_defined_in_header(arg1: type1, ...) returnType;
// defining a foreign variable
a_variable_defined_in_header: foreign type;
This way, type-checking can be implemented for c-addons making them safe to use.
But there are a couple of things that make it hard for us to implement this,
Volant functions are blocks, and there is so standard way to work with c functions in Volant.
In Volant, enums, structs, and unions are typedef-ed internally, and Volant isn't compatible with types that aren't typedef-ed.
If you have any good ideas about how we can solve these problems, we would love to hear them.
The text was updated successfully, but these errors were encountered:
The current way of interacting with c APIs is to prefix an identifier with the dollar sign ($). For example,
The identifiers starting with a dollar sign are not type-checked for obvious reasons. This approach is very simple and straight forward but it is very unsafe and can cause serious issues in large applications.
Volant needs a more safe and robust way of managing c addons. The specific details of how that system will work are not yet fully decided but here's a rough idea for how the addons will work,
This way, type-checking can be implemented for c-addons making them safe to use.
But there are a couple of things that make it hard for us to implement this,
If you have any good ideas about how we can solve these problems, we would love to hear them.
The text was updated successfully, but these errors were encountered: