9 ms·
This is quite difficult and puts you more into the realm of DSL's. Have you tried adding a fluent Builder interface? It's one of the better ways to handle these
by elcritch 11y ago
This is quite difficult and puts you more into the realm of DSL's. Have you tried adding a fluent Builder interface? It's one of the better ways to handle these types of problems in Java. For example:
```
ArrBuilder = arrs;
arrs.add(A, arrs.sin(B));
Array C = arrs.get();
```
Otherwise if you're willing to do Lombok style AST manipulation you could of course do most anything you wanted, perhaps even proper operator overloading:
```
@Arrays
public void test() {
Array C = A + sin(B);
}
```
(Just be ready for the Java programmers to rebel on you and your "dark arts" ;) )