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

Support type inference? #3

Closed
dtysky opened this issue Dec 26, 2017 · 3 comments
Closed

Support type inference? #3

dtysky opened this issue Dec 26, 2017 · 3 comments

Comments

@dtysky
Copy link

dtysky commented Dec 26, 2017

Hi.

In current time we know that typescript has a great ability to do type inference and we benefit a lot from it, etc:

export function test(i: number) {
    return i++;
}

Typescript will know that the result of test is number.

Lot of my projects are all strictly typed using type inference, but not explicit declaration, they could not pass your type checking.

Not only the typescript, c++, c#, and many modern languages are supporting type inference, and they could be compiled to wasm now or future. So could asc support it?

Thanks.

@dcodeIO
Copy link
Member

dcodeIO commented Dec 26, 2017

Sure. There is limited type inference for variable declarations with an initializer already. Test

@dcodeIO
Copy link
Member

dcodeIO commented Apr 4, 2018

Thanks, remaining parts are covered by #61, while I'd currently prefer to keep explicit return types.

@dcodeIO dcodeIO closed this as completed Apr 4, 2018
willemneal pushed a commit to willemneal/assemblyscript that referenced this issue Dec 22, 2018
…ased-threads-wait-wake-integration

Feature/worker based threads wait wake integration
@jarble
Copy link

jarble commented May 11, 2024

It is also possible to infer parameter types and return types using the v8 JavaScript engine's type profiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants