NeXeNi'm building a library to help devs to leverage various ways of limiting scope and creating value objects seamlessly without worrying about implementing edge cases themselves
NeXeNsince you lose identity there are some things there that have sharp corners, and so it'll just guarantee things like immutability and being able to do a thing and leverage it without so much work. mostly dx
NeXeNmight not be something one would use, but it's at least something one can look at and learn about the various strategies in implementing value objects
NeXeNnot every implementation needs value objects, but i'd like to at least have it for myself so i don't have to worry as much and i can just stay in the flow
jreicherNeXeN: do the objects get created "in isolation", or do you have something to create data structures?
* marcel joined #java
* rcreator joined #java
hassoon'morning
Parajreicher: I don't intend to do anything special with that, it's more that the basis of Valhalla is in there and that will bring a lot of other things as well.
ParaI'll be surprised if something doesn't break because of that.
* metalmaniac joined #java
* llanhmock joined #java
* soulofset joined #java
* jamezp joined #java
* Anaphaxeton joined #java
* rcreator joined #java
* Anaphaxet0n joined #java
* MikeBux joined #java
* yano joined #java
* m joined #java
* deavmi joined #java
* rcreator joined #java
* rcreator joined #java
* avu joined #java
* deavmi joined #java
* rcreator joined #java
* rcreator joined #java
* mindCrime joined #java
* deavmi joined #java
* deavmi joined #java
* deavmi joined #java
* Fiji joined #java
* Cae2 joined #java
* acidsys joined #java
* sa02irc joined #java
* Ragnor joined #java
* magla joined #java
* stfstfm joined #java
* sa02irc joined #java
* Anaphaxaway joined #java
* acidjnk joined #java
* deavmi joined #java
* j8shi joined #java
* ra4king joined #java
NeXeNjreicher: i dunno i'm just surmising
NeXeNmy plan is to simply implement various things that lend themselves to value objects, like Vector2D, Point3D, etc then complex numbers which will make them like primitives.....and say monetary amounts, timeseries timestamps, tensors, etc.
NeXeNjreicher: i found a neat trick with the try-with-resources statement that i'll use to limit scope. i'll use static global (with a scope object in the try statement) to change whatever strategy, like identity safe, primitive-packed ...you know...and during that scope block between the squirrely brackets you can do like Vector2D position = MyLib.vector2D(100.5, 200.25); or some such and it'll automagically produce that type of object but as a value object
NeXeN instead of a standard one
NeXeNtechnically anything implementing AutoCloseable can be scoped with a t-w-r block
NeXeNbecause at times you do want identity and at times you don't. so you could change it at any time procedurally within the block by passing an enum to a static method
* lockdown joined #java
* iwtga joined #java
NeXeNi could also use a lambda, hrmm with them being incredibly cheap that would eliminate typing try statement
NeXeNwait no, now that i think of it. using a lambda will allocate closure objects if you happen to reference local variables outside scope. in a large collection that would probably defeat the purpose. would have to document it