What does HackerNews think of manifold?

Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension Methods, Operator Overloading, Templates, a Preprocessor, and more.

Language: Java

#12 in GraphQL
#20 in Java
#13 in JSON
Patterns are somewhat nice to have, but for me they’re difficult to read, and not because my brain isn’t used to them. The simple identifier instanceof is about all I’ll use _most_ of the time. Otherwise, yes they are more concise, but lose too much information in the process.

I’d rather see a boatload load of other features before patterns. I’ve been experimenting with project manifold[1]. _That_ is the path Java sb on. Just my take.

1. https://github.com/manifold-systems/manifold

Yes. I suggest checking out the full project source: https://github.com/manifold-systems/manifold

It's very impressive and far bigger than the operator overloading stuff. The other videos in that series cover some of the other features.

I believe that once value types will be adopted by the JVM, operator overloading proposal for Java will be imminent. Meanwhile, there's actually a way to introduce operator overloading into your Java codebase today, the compiler plugin is called Manifold [1]

[1] https://github.com/manifold-systems/manifold

Kind of off topic, but is something using either Lombok[0] or Manifold[1] to have better ergonomics in Java? It sounds like a brilliant idea to me, but I don't use Java on a daily basis.

[0] https://projectlombok.org/ [1] https://github.com/manifold-systems/manifold

> but is there really a need to have this kind of language interoperability at compile time?

Well, if you want to leverage Java's static type system (and why not?), the answer is, yes. I imagine you'd want type and member references to the other language to resolve statically using the compiler, right? Similarly, why not have the same functionality in your IDE? Plus code completion, usage searching, refactoring?

Now, as I mentioned in an earlier comment, the embedding part of this addresses just a small segment of use-cases e.g., scoped query editing. The vast majority of other cases work directly against resource files, type-safely. Read more about that here:

https://github.com/manifold-systems/manifold

Indeed, the JVM sorely lacks in the reflection/metaprogrammaing department. The Manifold framework[1] picks up where Java leaves off. For instance, @Jailbreak is a badass, type-safe alternative to reflection.

[1]: https://github.com/manifold-systems/manifold

Reminds me of Manifold[1] for Java. But Manifold integrates seamlessly with the Java compiler as a plugin as opposed to being a separate compiler, which makes Circle less approachable imo. Still, I like the F# type provider-ish aspect of this.

[1]: https://github.com/manifold-systems/manifold

The Manifold project [1] nicely illustrates the author's proposition regarding structural typing and static type systems. Using the Manifold library you can indeed create structural interfaces [2] in Java similar to those in TypeScript. Manifold also enables the use of structural interfaces with Maps, it's pretty amazing.

[1] https://github.com/manifold-systems/manifold [2] https://github.com/manifold-systems/manifold/tree/master/man...

Data classes are nice, but they are not a general substitution for Properties, which address the greater getter/setter boilerplate concern. That said, you can use project Lombok for that pretty straightforwardly. You can also use project Manifold[1] to add useful features many of which Scala lacks:

* Type-safe metaprogramming (like F# type providers)

* Structural Typing

* Extension methods

* String interpolation

* Templates

* Type-safe reflection

* [Un]Checked exceptions

[1]: https://github.com/manifold-systems/manifold