Skip to content
New issue

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

[feature] Objects #12

Closed
Vurv78 opened this issue Feb 7, 2022 · 1 comment
Closed

[feature] Objects #12

Vurv78 opened this issue Feb 7, 2022 · 1 comment
Labels
A-Compiler Dealing with the compiler (analyzer, tokenizer, parser, transpiler) P-Medium Priority: Medium T-Feature Feature request

Comments

@Vurv78
Copy link
Owner

Vurv78 commented Feb 7, 2022

Is your feature request related to a problem? Please describe.
There's no way to interface with lua tables right now, at least non-sequential ones. This is one of the things holding this back from making a raytracer / using util.TraceLine

Describe the solution you'd like
Object types / Object values.

let foo = { bar = "foo", qux = 55 };

This would finally need a type rework to use complex structs and ids rather than strings for names etc.

Additional context
This could also be done with interfaces to define the type

interface Foo {
	bar: string,
	qux: double
};
let foo: Foo = { bar = "foo", qux = 55 };
@Vurv78 Vurv78 added T-Feature Feature request A-Compiler Dealing with the compiler (analyzer, tokenizer, parser, transpiler) P-Medium Priority: Medium labels Feb 7, 2022
@Vurv78
Copy link
Owner Author

Vurv78 commented Feb 28, 2022

They are not in the type system yet, but sort of resolved by be1c853

@Vurv78 Vurv78 closed this as completed Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Compiler Dealing with the compiler (analyzer, tokenizer, parser, transpiler) P-Medium Priority: Medium T-Feature Feature request
Projects
None yet
Development

No branches or pull requests

1 participant