const api = await remote {
import foo from 'foo.js';
export class A {
func() {
foo();
return 42;
}
}
};
const a = new api.A();
a.func() == 42;void main(void) {
pid_t pid;
pid = fork();
if (pid == 0)
ChildProcess();
else
ParentProcess();
}import java.rmi.*;
import java.rmi.server.*;
public interface Adder extends Remote {
public int add(int x,int y) throws RemoteException;
}
public class AdderRemote extends UnicastRemoteObject implements Adder {
AdderRemote() throws RemoteException{
super();
}
public int add(int x,int y){
return x+y
}
}
}And client:
import java.rmi.*;
import java.rmi.registry.*;
public class MyServer {
public static void main(String args[]) {
try {
Adder stub = new AdderRemote();
Naming.rebind("rmi://localhost:5000/sonoo", stub);
} catch(Exception e) {
System.out.println(e);
}
} new Thread(function() { console.log("Hello, threads!"); });
Not entirely sure if this is possible/desirable, but maybe, really maybe, with block params one could enable tasklets to be written with some really really hacky / underperforming code:
Something along the lines of:
So that the original gets translated to:
I'd be surprised if this ever worked, but kinda of an interesting thought.