ByteCode.News
Submit RSS Atom Sign in

Back to the channels

#java

  1. * deavmi joined #java
  2. * Betal joined #java
  3. * Crusher joined #java
  4. * hwpplayer1 joined #java
  5. * OmniRadix6989 joined #java
  6. * hwpplayer1 joined #java
  7. * m joined #java
  8. * Dukorr joined #java
  9. * mindCrime joined #java
  10. * Zapek joined #java
  11. * rvalue- joined #java
  12. * stfstfm joined #java
  13. * bliminse joined #java
  14. * deavmi joined #java
  15. * hwpplayer1 joined #java
  16. * marcel joined #java
  17. * pebble joined #java
  18. * ChaiTRex joined #java
  19. * PocketKiller joined #java
  20. * handicraftsman joined #java
  21. * LtHummus joined #java
  22. * michele joined #java
  23. * hwpplayer1 joined #java
  24. * michele joined #java
  25. Para https://news.ycombinator.com/item?id=49119063
  26. nevet JEP 401: Value Objects (Preview) merged to OpenJDK master | Hacker News
  27. javabot Para's title: "JEP 401: Value Objects (Preview) merged to OpenJDK master | Hacker News"
  28. NeXeN man i can't wait
  29. * TomyWork joined #java
  30. * m joined #java
  31. * TomyWork joined #java
  32. * MikeBux joined #java
  33. * TomyLobo2 joined #java
  34. * Cae2 joined #java
  35. * Cae2 joined #java
  36. * rcreator joined #java
  37. jreicher NeXeN: Para: what do you intend to use that for? I also have a use for it, but it's unlikely to be the same as yours
  38. jreicher ~jep401
  39. javabot 'JEP 401: Value Objects (Preview)' can be found at http://openjdk.java.net/jeps/401
  40. nevet JEP 401: Value Objects (Preview)
  41. NeXeN i'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
  42. NeXeN since 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
  43. NeXeN might 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
  44. NeXeN not 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
  45. jreicher NeXeN: do the objects get created "in isolation", or do you have something to create data structures?
  46. * marcel joined #java
  47. * rcreator joined #java
  48. hassoon 'morning
  49. Para jreicher: 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.
  50. Para I'll be surprised if something doesn't break because of that.
  51. * metalmaniac joined #java
  52. * llanhmock joined #java
  53. * soulofset joined #java
  54. * jamezp joined #java
  55. * Anaphaxeton joined #java
  56. * rcreator joined #java
  57. * Anaphaxet0n joined #java
  58. * MikeBux joined #java
  59. * yano joined #java
  60. * m joined #java
  61. * deavmi joined #java
  62. * rcreator joined #java
  63. * rcreator joined #java
  64. * avu joined #java
  65. * deavmi joined #java
  66. * rcreator joined #java
  67. * rcreator joined #java
  68. * mindCrime joined #java
  69. * deavmi joined #java
  70. * deavmi joined #java
  71. * deavmi joined #java
  72. * Fiji joined #java
  73. * Cae2 joined #java
  74. * acidsys joined #java
  75. * sa02irc joined #java
  76. * Ragnor joined #java
  77. * magla joined #java
  78. * stfstfm joined #java
  79. * sa02irc joined #java
  80. * Anaphaxaway joined #java
  81. * acidjnk joined #java
  82. * deavmi joined #java
  83. * j8shi joined #java
  84. * ra4king joined #java
  85. NeXeN jreicher: i dunno i'm just surmising
  86. NeXeN my 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.
  87. NeXeN jreicher: 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
  88. NeXeN instead of a standard one
  89. NeXeN technically anything implementing AutoCloseable can be scoped with a t-w-r block
  90. NeXeN because 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
  91. * lockdown joined #java
  92. * iwtga joined #java
  93. NeXeN i could also use a lambda, hrmm with them being incredibly cheap that would eliminate typing try statement
  94. NeXeN wait 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
  95. * acidjnk joined #java
  96. * iwtga6 joined #java