Replies: 2 comments 1 reply
-
Use a module. |
Beta Was this translation helpful? Give feedback.
1 reply
-
The approach described allows a developer to write 'static methods' in the module together with member methods in object Imagine having a module called |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Say you got a function
you want to access myObj
often as a first step towards alternative methods :
As a programming language, we wanna provide a nice experience for people who wants to do it, now I propose how to provide this experience in my opinion by analysing these three cases
I propose we return locals in functions without people having to write it
(An operator can support accessing what's in a function, for example
myAct()~.myObj
)(I say,
~let myObj = 5
for explicit export, once opt in implicit export is disabled,~let static myObj = 5
makesmyAct~.myObj
possible : see how I didn't execute the function)Sample :
as you can see functions are now structured, you can confuse them with classes, but the exported context in these functions aren't available as a data structure in the function's return rather it's available as a language feature when you access the function and its return, of course the exports are stored in some data structure ultimately I say it's stored in immutable struct
I say it makes a good case for Haskell's approach of something safe to something safe & useful
how are you feeling after reading
Beta Was this translation helpful? Give feedback.
All reactions