In linguistics, perspectivation is understood as a process of turning a mental representation into text. Perspectivation may be achieved using anaphors (textual references to prior information). I'm implementing anaphors for Java in the Eclipse IDE, will model them cognitively and study them empirically in order to figure out how Java source code with anaphors can be perspectivised for individual programmers in a manner that shortens source code and improves comprehensibility during code reading.
For a very simple example of perspectivation via an anaphor, see below snippets for two perspectivations of a reference to aMimeMessage
: normal Java code (top) and code using the anaphor message
(bottom).
final MimeMessage message = new MimeMessage(); send(message);
new MimeMessage(); send(message);The anaphor does not require a local variable to be declared. Instead, the suffix
message
of the
type MimeMessage
can used to refer to the instance because there are no other messages in scope.
There's also a demo video of the editor: https://vimeo.com/225761722 .
Most things I do are listed on http://monochromata.de/lop .