开发者
编程技术、框架工具、最佳实践
共 6642 篇 · 第 38/333 页
The Kimi K3 Moment
The Zilog Z80 has turned 50
submitted by /u/namanyayg [link] [留言]
Goodbye, and Thanks for All the Bikesheds
Your opinion matters... as does government transparency
submitted by /u/the_redwood_wanderer [link] [留言]
Fake food delivery site for the dopamine
How early SunOS did diskless workstations before NFS
No link between acetaminophen use during pregnancy and adverse birth outcomes
Surrender as a non-stupid life strategy
Gleam Is Now on Tangled
The Fermi Paradox, Percolation, and Inbreeding
What else do people draw on gradient.horse?
Source View Technology: Combining the Strengths of APT and AST
Background Take Lombok as an example: at compile time, it reads annotations like @Getter and @Setter through an Annotation Processor (APT, Annotation Processing Tool), then directly modifies the AST (Abstract Syntax Tree) in memory, injecting getter/setter methods for fields. Developers only need to annotate fields, and the compiled .class files automatically include these methods. Advantages of APT APT is an extension mechanism natively supported by the Java compiler. Annotation processors run at compile time and can read annotation information from source code to generate new source files. Its advantages are: Standardized — Simply implement the Processor interface; no need to hack the compiler Composable — Multiple annotation processors can work together in the same compilation process Generated code is visible — Source files generated through the Filer API are located in the build/generated/ directory, and IDEs can navigate to them after configuring the source path Disadvantages of APT APT has a fundamental limitation: it cannot generate a class with the same fully qualified name as the source code. The Java compiler explicitly specifies that two classes with the same fully qualified name are not allowed in the same compilation unit. Source code generated by APT participates in the same round of compilation as the original source code, so it can never generate a class with the same fully qualified name as the original class. This means APT cannot truly "modify" a class; it can only generate new classes (such as Builder, Factory, etc.). Advantages of AST Tools like Lombok bypass the APT limitation by directly modifying the AST in the compiler's memory — injecting methods for fields, injecting constructors for classes, etc. The advantages of AST modification are: Can modify existing classes — Methods are added directly to the AST in memory, breaking through the limitation that APT cannot generate Same-Name Classes Zero intrusion — Classes written by developers rema
WGSL Studio
submitted by /u/BigAd4703 [link] [留言]
British runner Josh Kerr breaks world record for mile which stood for 27 years
Distributed Inference on Kubernetes
submitted by /u/RelevantEmergency707 [link] [留言]
Code review is the only bottleneck that's growing. We have the data.
Every team I've worked with has a version of the same Slack message. Someone posts a PR link, adds a...
EU ban on destruction of unsold clothes and shoes enters into application
What Rose Petals Teach Us about Induction
Surprise! Facial recognition smart locks are actually good
Hands-free unlocking is the future of smart locks. The best smart home tech removes friction, and having your door unlock for you as you walk up is as frictionless as it gets - no passcodes to remember, no need to have a free hand to wave, press, or poke at the lock. One way to […]