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

Immutability #48

Open
ShalokShalom opened this issue Mar 24, 2018 · 2 comments
Open

Immutability #48

ShalokShalom opened this issue Mar 24, 2018 · 2 comments

Comments

@ShalokShalom
Copy link

Hi :)

Does your documentation lack passages about the core feature of functional programming or does your implementation?

@bigbes
Copy link

bigbes commented Aug 25, 2018

Oh, you're talking about Immutability. When you're using one or another language, you should know what types are immutable and what aren't.
Using Lua 'functional programming library' doesn't mean that it'll change rules of this "game":

  • strings/numbers/nil/bool are "immutable" (they're passed by value)
  • other types aren't (they're passed by reference and no "COW"y or similar technics are presented)

So I guess the answer is: "functional programming library" isn't something that'll make Lua fully "Functional Programming Language", but'll give you convenient shortcuts that are similar to FP technics. That's something you should keep in mind for all non-fp languages.

@ShalokShalom
Copy link
Author

Oh I see. I guess you can put this into your docs

@kyukhin kyukhin added this to the wishlist milestone Sep 9, 2021
@kyukhin kyukhin modified the milestone: wishlist Oct 15, 2021
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