Live data from Hacker News

Byte Buddy is a code generation and manipulation library for Java

bytebuddy.net

11–20 of 52 posts

Re: Byte Buddy is a code generation and manipulation library for Java

#12

The better question is why use Java for anything these days. If you really need to run something with JVM, use Kotlin.

As a Kotlin enjoyer, I find these comments counterproductive. Maybe they like the lack of extension functions?

Re: Byte Buddy is a code generation and manipulation library for Java

#14

The better question is why use Java for anything these days. If you really need to run something with JVM, use Kotlin.

As a Kotlin enjoyer, I find these comments counterproductive. Maybe they like the lack of extension functions?

Kotlin is fatter, compiler is slower, code completion is slow as hell on large projects, but other than building small applications - there's really no reason to not use kotlin except for the fact that you need to actually learn the language or else you're going to end up with very very slow codebase where opening a file and waiting for syntax highlighting takes 2-3 seconds and typing autocomplete is just painfully slow.

Re: Byte Buddy is a code generation and manipulation library for Java

#16
post #15
post #3

Note that Java now has its own API for this purpose. https://openjdk.org/jeps/484

Ideally, tools like ByteBuddy will adopt that API as it's for low level concerns.

We are already living in an (almost) ideal world: https://github.com/raphw/byte-buddy/discussions/1798

Re: Byte Buddy is a code generation and manipulation library for Java

#17
post #5
post #3

Note that Java now has its own API for this purpose. https://openjdk.org/jeps/484

How does that compare in terms of usability and completeness?

It is complete, and I’ve found it extremely usable when writing code to trawl over a large number of class files. Looks like it should be good for code generation as well but I haven’t used that yet.

Re: Byte Buddy is a code generation and manipulation library for Java

#18

Earlier quoted context omitted.

As a Kotlin enjoyer, I find these comments counterproductive. Maybe they like the lack of extension functions?

Kotlin is fatter, compiler is slower, code completion is slow as hell on large projects, but other than building small applications - there's really no reason to not use kotlin except for the fact that you need to actually learn the language or else you're going to end up with very very slow codebase where opening a file and waiting for syntax highlighting takes 2-3 seconds and typing autocomplete is just painfully s…

"fatter, compiler is slower, code completion is slow as hell" - if that's all you want out of your programming language, then Java is probably a good choice for you.

For others that value the things that Kotlin brings over Java (even modern Java), and for the ways in which it delivers a simpler experience than Scala - I think it's a pragmatic and sensible decision.

Re: Byte Buddy is a code generation and manipulation library for Java

#19

The better question is why use Java for anything these days. If you really need to run something with JVM, use Kotlin.

As a Kotlin enjoyer, I find these comments counterproductive. Maybe they like the lack of extension functions?

I do like the lack of extension functions. I find them confusing, especially when you can use them on things that are null.

Re: Byte Buddy is a code generation and manipulation library for Java

#20

The better question is why use Java for anything these days. If you really need to run something with JVM, use Kotlin.

> The better question is why use Java for anything these days.

Java (the language) is pretty much "C for the JVM." By that, I mean frameworks/libraries intended for maximum potential use in languages running on the JVM (such as Kotlin, Scala, and of course Java) all support Java (the language) interoperability. Many written in alternate languages targeting the JVM, such as Akka[0], typically have some degree of Java (the language) support as well.

While I prefer to program in one of the alternate programming languages targeting the JVM, I understand why many OSS projects are implemented in Java (the language) for the reasons outlined above.

0 - https://github.com/akka/akka

Post reply on HN