Manifold: Java Type-Safe Metaprogramming, Structural Typing, Extension Methods
21–30 of 44 posts
Re: Manifold: Java Type-Safe Metaprogramming, Structural Typing, Extension Methods
#22Re: Manifold: Java Type-Safe Metaprogramming, Structural Typing, Extension Methods
#23Removing checked exceptions - what a dangerous feature!
http://manifold.systems/docs.html#checked-exception-suppress...
Re: Manifold: Java Type-Safe Metaprogramming, Structural Typing, Extension Methods
#24At that point, why not just use another jvm language with these features like Kotlin?
Re: Manifold: Java Type-Safe Metaprogramming, Structural Typing, Extension Methods
#25At that point, why not just use another jvm language with these features like Kotlin?
Re: Manifold: Java Type-Safe Metaprogramming, Structural Typing, Extension Methods
#26At that point, why not just use another jvm language with these features like Kotlin?
Selling a new language is hard, selling a library is easier, even if this one has a hook deep in the code of javac.
[1] https://en.wikipedia.org/wiki/Gosu_(programming_language)
Re: Manifold: Java Type-Safe Metaprogramming, Structural Typing, Extension Methods
#27The only contentious point I find is that they are basically replicating Project Lombok's @SneakyThrows annotation via "Xplugin:Manifold stringsexceptions" or ModelMapper in their Structural Typing.
Furthermore it seems it should be structured in sub-projects, eg. the String-templates and ManTL in one lib, Structural Typing in another so we can mix & match.
But overall, very impressive!
Re: Manifold: Java Type-Safe Metaprogramming, Structural Typing, Extension Methods
#28Removing checked exceptions - what a dangerous feature!
It's optional. It seems scary, but checked exceptions are a feature exclusive to the Java compiler -- the JVM does not enforce them. This is how JVM languages like Kotlin and others only use unchecked exceptions, and also how Manifold gets away with muting them as a compile-time feature.
Checked exceptions is a stupid feature because it makes an implementation detail, the fact that a code raises an exception, part of the type of a method.
Scala, C# or Kotlin have no checked exception and it doesn't make them less safe.
Re: Manifold: Java Type-Safe Metaprogramming, Structural Typing, Extension Methods
#29Re: Manifold: Java Type-Safe Metaprogramming, Structural Typing, Extension Methods
#30I thought I knew all about Java, but this thing makes me feel like I haven't got a clue! How can it achieve this stuff by just being in the classpath?? No Java agent can be involved, no codegen during the build?! This shouldn't be possible, or??
Ok just checked this deeper. The [docs]( http://manifold.systems/docs.html ) actually show this is a javac plugin (I didn't know about the `-Xplugin` flag, but you ALSO need to pass that to javac for Manifold to work)... you also need the `tools.jar` file (which includes the JavaCompiler) on the runtime classpath... so suddenly, there's no magic... it's a bit misleading to say this does not require a build step, it c…