AdeptLanguage / Adept

The Adept Programming Language
GNU General Public License v3.0
119 stars 8 forks source link

Should Adept support type inference? #306

Open ghost opened 5 months ago

ghost commented 5 months ago

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.

IsaacShelton commented 5 months ago

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

ghost commented 5 months ago

Which syntax will you use for type inference?

IsaacShelton commented 4 months ago

The syntax is still undecided,

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

ghost commented 4 months ago

This will happen on Adept 2.8 or Adept 3.0?

IsaacShelton commented 4 months ago

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