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

is let keyword necesary? #33

Closed
fega opened this issue Jul 31, 2018 · 2 comments
Closed

is let keyword necesary? #33

fega opened this issue Jul 31, 2018 · 2 comments

Comments

@fega
Copy link

fega commented Jul 31, 2018

I would be great to remove it, as I saw in the docs, it doesn't looks neccesary.

@ospencer
Copy link
Member

It's not technically necessary.

It's more of a developer familiarity thing, since the people who would want to use Grain are probably pretty familiar with JavaScript or an ML language where let is pretty comfortable.

You could definitely argue that Python doesn't require it and gets along just fine (and it would be even more clear in Grain since reassignments aren't allowed without using a box).

It's something to consider, for sure.

@peblair
Copy link
Member

peblair commented Jul 31, 2018

Personally, I am a fan of let, as it helps visually clarify the scope in which a variable is defined. Moreover, while Grain does not currently have traditional mutation, sticking with the keyword increases the language's syntactic flexibility on that front in the future.

As @ospencer implies, however, a lot of it really boils down to preference. I don't want to totally count out let-less Grain, but I'm not totally sure we want to take that route at this moment.

@ospencer ospencer closed this as completed Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants