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

The design of envelope classes #947

Closed
wladyan opened this issue Aug 25, 2018 · 45 comments
Closed

The design of envelope classes #947

wladyan opened this issue Aug 25, 2018 · 45 comments

Comments

@wladyan
Copy link

wladyan commented Aug 25, 2018

I think the design of IterableEnvelope, CollectionEnvelope, ListEnvelope is wrong. I gess, it would be better to delegate all method calls to encapsulated object, instead to define of method implementation. Envelopes must don't care about mutability protection, for this goal we have decorators. For example, ListOf class use Collections.unmodifiableList decorator. May be I'm wrong. Help me.

@0crat
Copy link
Collaborator

0crat commented Aug 25, 2018

@llorllale/z please, pay attention to this issue

@0crat
Copy link
Collaborator

0crat commented Aug 25, 2018

@wladyan/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!

@llorllale
Copy link
Contributor

@wladyan I think you're reporting two separate issues?

  1. Envelopes should delegate all calls to the enveloped object
    You may have a point. Envelopes' purpose is to provide the interface implementations. These are doing that and providing immutability. Immutability is part of our principles, but then again, immutability could be provided by a decorator. Will have to think about it a little bit...

  2. ListOf uses Collections.unmodifiableList
    I think this is just a small implementation detail arising from the fact that ListOf is eagerly copying that whole input into a new list.

@wladyan
Copy link
Author

wladyan commented Sep 22, 2018

@llorllale I'm talking only about envelope classes. Implemetation of ListOf class is absolutely correct for me.

Immutability is one of the main principles in this library, but another principle is "avoid nulls". Why envelopes don't protect me against nulls? For this purporse we have NoNulls decorators and envelopes don't care about nulls.

Envelopes should delegate all calls to the enveloped object, and this object makes decision about immutability(to be immutable or to be mutable), and about nulls(support null values or not).

What if I need to create my own mutable implementation of a List. Unfortunately I can't use ListEnvelope, because it works as decorator sometimes.

@llorllale
Copy link
Contributor

@wladyan yes, I agree. We will resume this after 1.0 is released

@llorllale
Copy link
Contributor

@wladyan we're still not at 1.0 yet but we'll start work on this

@llorllale
Copy link
Contributor

@0crat in

@0crat 0crat added the scope label Jun 21, 2019
@0crat
Copy link
Collaborator

0crat commented Jun 21, 2019

@0crat in (here)

@llorllale Job #947 is now in scope, role is DEV

@0crat
Copy link
Collaborator

0crat commented Jun 21, 2019

@0crat in (here)

@llorllale Thanks for your contribution, @wladyan/z! If you would be a member of the project, you would now earn +15 reputation points, as explained in §29. You can join and apply to it, see §2.

@0crat
Copy link
Collaborator

0crat commented Jun 30, 2019

The job #947 assigned to @victornoel/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

@victornoel
Copy link
Collaborator

@llorllale so is the objective here to make envelopes directly delegate to enveloped object and removing specific behaviour there? Or do you have something else in mind, I'm not clear following the discussion you had with @wladyan :)

@scristalli
Copy link
Contributor

@llorllale @victornoel I'm interested too, since this issue is crucial for deciding how to solve #898.
From what I understood following the discussion (see also #1008), the removal of immutability from envelopes seems a good option, otherwise we would have to create a specific envelope/decorator just for providing mutability.

@llorllale
Copy link
Contributor

@victornoel envelopes will delegate to enveloped object; we will also create Immutable decorators

@victornoel
Copy link
Collaborator

@0crat wait for #1154 to be merged

@0crat 0crat added the waiting label Jun 30, 2019
@0crat
Copy link
Collaborator

0crat commented Jun 30, 2019

@0crat wait for #1154 to be merged (here)

@victornoel The impediment for #947 was registered successfully by @victornoel/z

@0crat
Copy link
Collaborator

0crat commented Sep 11, 2019

The architect of the project has changed; @llorllale/z is not at this role anymore; @paulodamaso/z is the architect now

victornoel added a commit to victornoel/cactoos that referenced this issue Sep 11, 2019
victornoel added a commit to victornoel/cactoos that referenced this issue Sep 14, 2019
victornoel added a commit to victornoel/cactoos that referenced this issue Sep 14, 2019
@wladyan
Copy link
Author

wladyan commented Sep 16, 2019

@victornoel ok, thanks.

@wladyan wladyan closed this as completed Sep 16, 2019
@0crat 0crat removed the waiting label Sep 16, 2019
@0crat
Copy link
Collaborator

0crat commented Sep 16, 2019

@paulodamaso/z all QAs are on vacation. Please handle that.

@0crat 0crat removed the scope label Sep 16, 2019
@0crat
Copy link
Collaborator

0crat commented Sep 16, 2019

The job #947 is now out of scope

@victornoel
Copy link
Collaborator

@0pdd
Copy link
Collaborator

0pdd commented Nov 18, 2019

@wladyan 3 puzzles #1183, #1185, #1242 are still not solved; solved: #1184.

@0pdd
Copy link
Collaborator

0pdd commented Dec 17, 2019

@wladyan 4 puzzles #1183, #1185, #1242, #1262 are still not solved; solved: #1184.

@0pdd
Copy link
Collaborator

0pdd commented Jan 7, 2020

@wladyan 3 puzzles #1183, #1185, #1242 are still not solved; solved: #1184, #1262.

@0pdd
Copy link
Collaborator

0pdd commented Feb 6, 2020

@wladyan 2 puzzles #1183, #1242 are still not solved; solved: #1184, #1185, #1262.

@0pdd
Copy link
Collaborator

0pdd commented Feb 11, 2020

@wladyan 15 puzzles #1183, #1292, #1293, #1294, #1295, #1296, #1297, #1298, #1299, #1300, #1301, #1302, #1303, #1304, #1305 are still not solved; solved: #1184, #1185, #1242, #1262.

@0pdd
Copy link
Collaborator

0pdd commented Feb 24, 2020

@wladyan 14 puzzles #1183, #1292, #1293, #1295, #1296, #1297, #1298, #1299, #1300, #1301, #1302, #1303, #1304, #1305 are still not solved; solved: #1184, #1185, #1242, #1262, #1294.

@0pdd
Copy link
Collaborator

0pdd commented Feb 26, 2020

@wladyan 11 puzzles #1183, #1292, #1293, #1295, #1298, #1299, #1300, #1301, #1302, #1304, #1305 are still not solved; solved: #1184, #1185, #1242, #1262, #1294, #1296, #1297, #1303.

@0pdd
Copy link
Collaborator

0pdd commented Mar 9, 2020

@wladyan 11 puzzles #1183, #1292, #1295, #1298, #1299, #1300, #1301, #1302, #1304, #1305, #1320 are still not solved; solved: #1184, #1185, #1242, #1262, #1293, #1294, #1296, #1297, #1303.

@0pdd
Copy link
Collaborator

0pdd commented Mar 15, 2020

@wladyan 11 puzzles #1183, #1295, #1298, #1299, #1300, #1301, #1302, #1304, #1305, #1320, #1325 are still not solved; solved: #1184, #1185, #1242, #1262, #1292, #1293, #1294, #1296, #1297, #1303.

@0pdd
Copy link
Collaborator

0pdd commented Mar 17, 2020

@wladyan 10 puzzles #1183, #1295, #1298, #1300, #1301, #1302, #1305, #1320, #1325, #1326 are still not solved; solved: #1184, #1185, #1242, #1262, #1292, #1293, #1294, #1296, #1297, #1299, #1303, #1304.

@0pdd
Copy link
Collaborator

0pdd commented Mar 29, 2020

@wladyan 9 puzzles #1183, #1295, #1298, #1300, #1301, #1302, #1305, #1320, #1325 are still not solved; solved: #1184, #1185, #1242, #1262, #1292, #1293, #1294, #1296, #1297, #1299, #1303, #1304, #1326.

@0pdd
Copy link
Collaborator

0pdd commented Mar 29, 2020

@wladyan 8 puzzles #1183, #1295, #1298, #1300, #1301, #1302, #1305, #1320 are still not solved; solved: #1184, #1185, #1242, #1262, #1292, #1293, #1294, #1296, #1297, #1299, #1303, #1304, #1325, #1326.

@0pdd
Copy link
Collaborator

0pdd commented Mar 30, 2020

@wladyan 5 puzzles #1183, #1295, #1300, #1302, #1320 are still not solved; solved: #1184, #1185, #1242, #1262, #1292, #1293, #1294, #1296, #1297, #1298, #1299, #1301, #1303, #1304, #1305, #1325, #1326.

@0pdd
Copy link
Collaborator

0pdd commented Apr 1, 2020

@wladyan 5 puzzles #1183, #1295, #1302, #1320, #1337 are still not solved; solved: #1184, #1185, #1242, #1262, #1292, #1293, #1294, #1296, #1297, #1298, #1299, #1300, #1301, #1303, #1304, #1305, #1325, #1326.

@0pdd
Copy link
Collaborator

0pdd commented Apr 3, 2020

@wladyan 3 puzzles #1183, #1320, #1337 are still not solved; solved: #1184, #1185, #1242, #1262, #1292, #1293, #1294, #1295, #1296, #1297, #1298, #1299, #1300, #1301, #1302, #1303, #1304, #1305, #1325, #1326.

@0pdd
Copy link
Collaborator

0pdd commented Apr 23, 2020

@wladyan 3 puzzles #1183, #1337, #1349 are still not solved; solved: #1184, #1185, #1242, #1262, #1292, #1293, #1294, #1295, #1296, #1297, #1298, #1299, #1300, #1301, #1302, #1303, #1304, #1305, #1320, #1325, #1326.

@0pdd
Copy link
Collaborator

0pdd commented Apr 30, 2020

@wladyan 2 puzzles #1183, #1349 are still not solved; solved: #1184, #1185, #1242, #1262, #1292, #1293, #1294, #1295, #1296, #1297, #1298, #1299, #1300, #1301, #1302, #1303, #1304, #1305, #1320, #1325, #1326, #1337.

@0pdd
Copy link
Collaborator

0pdd commented Sep 13, 2020

@wladyan the puzzle #1183 is still not solved; solved: #1184, #1185, #1242, #1262, #1292, #1293, #1294, #1295, #1296, #1297, #1298, #1299, #1300, #1301, #1302, #1303, #1304, #1305, #1320, #1325, #1326, #1337, #1349.

@0pdd
Copy link
Collaborator

0pdd commented Sep 15, 2020

@wladyan the puzzle #1464 is still not solved; solved: #1183, #1184, #1185, #1242, #1262, #1292, #1293, #1294, #1295, #1296, #1297, #1298, #1299, #1300, #1301, #1302, #1303, #1304, #1305, #1320, #1325, #1326, #1337, #1349.

@0pdd
Copy link
Collaborator

0pdd commented Jan 25, 2021

@wladyan 2 puzzles #1537, #1538 are still not solved; solved: #1183, #1184, #1185, #1242, #1262, #1292, #1293, #1294, #1295, #1296, #1297, #1298, #1299, #1300, #1301, #1302, #1303, #1304, #1305, #1320, #1325, #1326, #1337, #1349, #1464.

@0pdd
Copy link
Collaborator

0pdd commented May 7, 2021

@wladyan all 27 puzzles are solved here: #1183, #1184, #1185, #1242, #1262, #1292, #1293, #1294, #1295, #1296, #1297, #1298, #1299, #1300, #1301, #1302, #1303, #1304, #1305, #1320, #1325, #1326, #1337, #1349, #1464, #1537, #1538.

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

6 participants