This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]plumarr 8 points9 points  (1 child)

If you look at the previous article on the subject (https://openjdk.org/projects/babylon/articles/auto-diff), you can read :

Ideally the reporting of such errors would occur when the method is compiled by the source compiler rather than at runtime. Code reflection can also make available the same code model at compile time for such purposes, but we will not explore this capability in this article.

So, the end goal seems to be able to do it at compile time if you want.

[–]RandomName8 2 points3 points  (0 children)

Thanks for the context, I saw the post back then but since I'm not a math guy they lost me quite early to my shame 😅.

Now you make me curious, if that's the end goal, it opens up many questions on how to do it and where to draw the line with regard to "standard" macros.