Native peers a native implementations (possibly several static methods on a native class) that implement some of the methods in the lense class. This differs from native types where the whole type is native. With native peers the bulk of the code is written in lense and some methods are delegated to native code
class Buffer {
constructor Buffer (length : Natural, encoding : Encoding);
public write (String text){ // defined in lense
write(encoding .asByteSequence(text));
}
public native write (Sequence<Byte> bytes); //defined in the native peer
Native peers a native implementations (possibly several static methods on a native class) that implement some of the methods in the lense class. This differs from native types where the whole type is native. With native peers the bulk of the code is written in lense and some methods are delegated to native code
class Buffer {
}