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

Map Proxy API + Implementation #92

Merged
merged 17 commits into from
May 3, 2016

Conversation

mustafaiman
Copy link
Contributor

@mustafaiman mustafaiman commented Apr 25, 2016

fixes #18. Note that this API does not include executeOnKeys, addInterceptor and Predicates related methods. These will come with Serialization implementation.

@mustafaiman mustafaiman force-pushed the more-map-proxy branch 2 times, most recently from da42b3f to eeae621 Compare April 27, 2016 09:08
@devOpsHazelcast
Copy link
Contributor

Test PASSed.

var partitionsToKeys: {[id: string]: any} = {};
var key: K;
for (var i in keys) {
key = keys[i];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why declare outside of the loop and then reassign within it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting it inside for method does not make its scope restricted to for loop. So I intentionally put them outside. This way it is less likely that someone mistakenly introduces the same variable later in the same method expecting it to be null. Matter of taste.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use let variableName = value it will be restricted to the loop scope.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we use Typescript compiler target as ES5 all lets are transpiled to var. So this would be worse. You expect it to be block scoped and get function scoped. Since Node 4 do not support majority of ES6 features we have to stick with ES5 and vars.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is requests from community to make Typescript support selectively turning on and off certain features: microsoft/TypeScript#4389 . I hope they support this feature and we can use cool ES6 features that Node already supports.

@devOpsHazelcast
Copy link
Contributor

Test PASSed.

@GhostInAMachine GhostInAMachine merged commit 597bc28 into hazelcast:master May 3, 2016
@mustafaiman mustafaiman deleted the more-map-proxy branch May 3, 2016 13:02
@jackspaniel
Copy link

Any idea when this will be published to npm?

@mustafaiman
Copy link
Contributor Author

Hello @jackspaniel . This is already merged to master so it will be available with 0.3 release. 0.3 is planned to be released early June.

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

Successfully merging this pull request may close these issues.

Map Proxy Implementation
4 participants