【Hacker News搬运】秀HN:我写了一本关于Java的书
-
Title: Show HN: I Wrote a Book on Java
秀HN:我写了一本关于Java的书
Text: <a href="https://www.manning.com/books/data-oriented-programming-in-java" rel="nofollow">https://www.manning.com/books/data-oriented-programming-in-j...</a><p>This book is a distillation of everything I’ve learned about what effective development looks like in Java (so far!). It's about how to organize programs around data "as plain data" and the surprisingly benefits that emerge when we do. Programs that are built around the data they manage tend to be simpler, smaller, and significantly easier understand.<p>Java has changed radically over the last several years. It has picked up all kinds of new language features which support data oriented programming (records, pattern matching,
with
expressions, sum and product types). However, this is not a book about tools. No amount of studying a screw-driver will teach you how to build a house. This book focuses on house building. We'll pick out a plot of land, lay a foundation, and build upon it house that can weather any storm.<p>DoP is based around a very simple idea, and one people have been rediscovering since the dawn of computing, "representation is the essence of programming." When we do a really good job of capturing the data in our domain, the rest of the system tends to fall into place in a way which can feel like it’s writing itself.<p>That's my elevator pitch! The book is currently in early access. I hope you check it out. I'd love to hear your feedback.<p>You can get 50% off (thru October 9th) with codemlkiehl
<a href="https://www.manning.com/books/data-oriented-programming-in-java" rel="nofollow">https://www.manning.com/books/data-oriented-programming-in-j...</a>
<a href=“https:”www.manning.com“books”“java面向数据的编程”rel=“nofollow”>https:”/;www.manning.com;书籍;面向数据的Java编程</a><p>这本书是我所学到的关于Java中有效开发的一切的精华(到目前为止!)。它;关于如何围绕数据组织程序;作为普通数据”;当我们这样做时,会出现令人惊讶的好处。围绕它们管理的数据构建的程序往往更简单、更小、更容易理解<p> Java在过去几年中发生了根本性的变化。它采用了支持面向数据编程的各种新语言特性(记录、模式匹配、“with”表达式、求和和和乘积类型)。然而,这不是一本关于工具的书。无论你学习螺丝刀多少,都无法教会你如何建造房子。这本书主要关注房屋建筑。我们;我会挑一块地,打地基,在上面建一座能抵御任何风暴的房子<p> DoP基于一个非常简单的理念,自计算机出现以来,人们一直在重新发现这一理念。";表示是编程的本质&“;当我们在我们的领域中很好地捕获数据时,系统的其他部分往往会以一种感觉就像它自己编写的方式就位<p> 那;这是我的电梯推销!这本书目前处于早期访问阶段。我希望你能看看。我;我很想听听你的反馈<p> 您可以使用代码`mlkiehl获得50%的折扣(截至10月9日)`<a href=“https:”www.manning.com“books”“java面向数据的编程”rel=“nofollow”>https:”/;www.manning.com;书籍;面向数据的j编程</a>
Url:
Post by: goostavos
Comments:
raju: Let me start by saying (as someone who has written a few technical books of his own)—Congratulations!<p>I am sure you (assuming this is your first book) are learning that this is a labor of love, and I wish you the very best in this endeavor. You should be proud!<p>I was exposed to "data oriented programming" thanks to Clojure—wherein maps/sets are the constructs used to pass data (as plain data) around, with simple functions that work with the data, as opposed to the traditional OO (hello ORM) that mangles data to fit some weird hierarchy.<p>Java's recent innovations certainly make this a lot easier, and I am glad someone is looking at propagating a much needed message.<p>I will take a look at the book, but I wish you the very best.
raju: 首先,让我说(作为一个自己写过几本技术书籍的人)——祝贺你<p> 我相信你(假设这是你的第一本书)正在学习这是一种爱的劳动,我祝愿你在这项努力中一切顺利。你应该感到骄傲<p> 我接触到";面向数据的编程”;感谢Clojure——其中maps;集合是用于传递数据(作为普通数据)的构造,具有处理数据的简单函数,与传统的OO(hello ORM)不同,后者会对数据进行修改以适应一些奇怪的层次结构<p> Java;最近的创新无疑使这一点变得容易得多,我很高兴有人正在考虑传播一个急需的信息<p> 我会看看这本书,但我祝你一切顺利。
topspin: How have you dealt with the current situation in Java where several new and important language features are still "preview" and are subject to being withdrawn? The possibility that these features might ultimately disappear is not theoretical: String Templates has been removed[1] from 23 as what would have been the "third preview," for example.<p>The (likely debatable) list of features in 23 that a.) remain preview/incubator and b.) appear relevant to a work on data oriented Java programming are:<p><pre><code> Primitive Types in Patterns, instanceof, and switch (Preview) – JEP 455
Implicitly Declared Classes and Instance Main Methods (Third Preview) – JEP 477
Flexible Constructor Bodies (Second Preview) – JEP 482
Vector API (Eighth Incubator) - JEP 469
Scoped Values (Third Preview) – JEP 481
</code></pre>
[1] <a href="https://mail.openjdk.org/pipermail/amber-spec-experts/2024-April/004106.html" rel="nofollow">https://mail.openjdk.org/pipermail/amber-spec-experts/2024-A...</a>
"So, to be clear: there will be no string template feature, even with --enable-preview, in JDK 23." - Gavin Biermantopspin: 您是如何处理Java中的当前情况的,其中几个新的和重要的语言特性仍然是“;预览”;是否会被撤回?这些特征最终可能消失的可能性并不是理论上的:字符串模板已从23中删除[1],因为“;第三次预览,“;例如<p> 23中的(可能有争议的)功能列表a.)仍然是预览版;孵化器和b.)与面向数据的Java编程工作相关的是:<p><pre><code>模式中的基本类型、实例和开关(预览版)-JEP 455隐式声明类和实例主方法(第三个预览版)-JEP 477柔性结构体(第二预览版)-JEP 482矢量API(第八个培养箱)-JEP 469范围值(第三次预览)-JEP 481</code></pre>[1] <a href=“https:/;mail.openjdk.org/ pipermail�年4月 004106.html”rel=“nofollow”>https:/;mail.openjdk.org;pipermail;琥珀规格专家;2024年</a>&“;因此,需要明确的是:在JDK 23中,即使有--enable-preview,也不会有字符串模板功能。”-加文·比尔曼
mands: Technical Editor: Brian Goetz - you have my attention...
mands: 技术编辑:Brian Goetz——我注意到你了。。。
olpquest22: Congratulations!
consider posting about in <a href="https://www.reddit.com/r/java/" rel="nofollow">https://www.reddit.com/r/java/</a> it is a very active java community.olpquest22: 祝贺 你!考虑在<a href=“https:/;www.reddit.com/ r/-java�”rel=“nofollow”>https:/;www.reddit.com;r;java</a> 它是一个非常活跃的java社区。
TeaVMFan: Congratulations! In case people are looking for other modern Java books, here's one I'm working for building modern web apps in Java:<p><a href="https://frequal.com/Flavour/book.html" rel="nofollow">https://frequal.com/Flavour/book.html</a><p>It describes how to make single-page apps in Java, using the Flavour framework. No plugins, no extensions, and 99.9% pure Java. Plenty of sample code and links to relevant podcast episodes and demos.
TeaVMFan: 祝贺 你!如果人们正在寻找其他现代Java书籍,请点击此处;这是一个I;m正在用Java构建现代web应用程序:<p><a href=“https:/;frequal.com/ Flavour book.html”rel=“nofollow”>https:/;frequal.com;风味;book.html</a><p>它描述了如何使用Flavour框架在Java中制作单页应用程序。没有插件,没有扩展,99.9%纯Java。大量的示例代码和相关播客集和演示的链接。