Adept icon indicating copy to clipboard operation
Adept copied to clipboard

Should Adept support type inference?

Open ghost opened this issue 1 year ago • 5 comments

Discussed in https://github.com/AdeptLanguage/Adept/discussions/158

Originally posted by ghost September 30, 2023 It's something very useful to have. Type inference is not something specific to dynamic languages. Static typing languages still can support type inference. For example, C++'s auto.

LSP is available now (I have never tested it, though). But, it's time to consider support for type inference.

ghost avatar Feb 11 '24 09:02 ghost

Type inference could be re-considered now yes, although it might not appear until v3.0 since it may require some reworking of compiler internals

IsaacShelton avatar Feb 12 '24 05:02 IsaacShelton

Which syntax will you use for type inference?

ghost avatar Feb 16 '24 12:02 ghost

The syntax is still undecided,

the most promising is something like let x = 10 or x := 10

IsaacShelton avatar Feb 20 '24 00:02 IsaacShelton

This will happen on Adept 2.8 or Adept 3.0?

ghost avatar Feb 21 '24 06:02 ghost

Most likely not until 3.0, as the 2.8 compiler would need some significant restructuring for it to work

IsaacShelton avatar Feb 23 '24 16:02 IsaacShelton