KittyCAD / modeling-app

The KittyCAD modeling app.
https://kittycad.io/modeling-app/download
MIT License
422 stars 35 forks source link

Rename "const" to "let" #439

Closed adamchalmers closed 1 month ago

adamchalmers commented 1 year ago

Problem

'const' is just a weird phrase to anyone who's not a programmer. KCL doesn't have mutable bindings so we don't need a special "const" keyword to distinguish from "let".

Solution

Rename the "const" keyword to "let".

adamchalmers commented 1 year ago

@jessfraz @Irev-Dev @franknoirot @jgomez720 thoughts?

jessfraz commented 1 year ago

we have let fwiw so this would be deleting const, we also have var

jessfraz commented 1 year ago

im fine with it , lots of tests would need to be updated

jessfraz commented 1 year ago

and the tests in the cli repo

jessfraz commented 1 year ago

https://github.com/KittyCAD/modeling-app/blob/main/src/wasm-lib/kcl/src/abstract_syntax_tree_types.rs#L1006

adamchalmers commented 1 year ago

Hmm are there differences between let const and var right now? I didn't think we had variable mutation.

jessfraz commented 1 year ago

Nope which is why I’m okay w removing const since if we want an immutable var in the future we won’t break anyone by actually making that true On Sep 11, 2023, at 19:39, Adam Chalmers @.***> wrote: Hmm are there differences between let const and var right now?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

jgomez720 commented 1 year ago

Going through my notifications. I'm sure you all talked about this enough, but I have no preference on const, let, var, etc.