P.Hill said:
Next thing you know you'll want us to program in LISP!
"A good C hacker will use Lisp when possible."
-- Rahul Jain
But look at this:
@ManyToMany(cascade=CREATE)
@AssociationTable(
table=@Table(name="EMP_PROJ"),
joinColumns=
@JoinColumn(name="EMP_ID", referencedColumnName="ID"),
inverseJoinColumns=
@JoinColumn(name="PROJ_ID", referencedColumnName="ID"))
This is Java 1.5, but to me it looks like S-expressions
augmented with attributes.
Recently, i did "invent" a text markup language, which also
happens to be a subset of Java 1.5 and is akin to
S-expressions. A section, beginning with a subsection looks
like this:
Section section =
o(x( "title", "Schnittstellen in Java" ),
o(x( "title", "Nutzen von Schnittstellen" ),
o("Durch den richtigen Einsatz von Schnittstellen ",
"werden alle sinnvollen Bindungen von Methoden an Objekte ",
"möglich. Bei direkter Bindung ohne Schnittstellen, ",
"wären sonst bestimmte sinnvolle Kombinationen ",
"erschwert oder unmöglich. Dadurch können ",
"Methoden und Objekte besser wiederverwendet ",
"werden. Somit verbessert sich letztendlich das ",
"Verhältnis zwischen dem Arbeitsaufwand zur ",
"Programmierung und dem Umfang des damit bewältigten ",
"Anteils eines Problems. " )),
o(x( "title", "Schnittstellen im Alltag" ),
...
A "section" is marked "o" and might contain a list of plain
String entries (thanks to the new varargs feature) and
attributes, which are marked with "x". This markup language
can be used like XML. The example program I have built with
that formats this markup structure to a plain text file, doing
paragraph wrapping and so, but might as well output it to HTML.
For example, "o" and "x" might be defined as:
final static Section o
( final java.lang.Object ... args )
{ return new Section( args ); }
final static java.lang.Object x
( final java.lang.String relation, final java.lang.String text )
{ return new Attribute( relation, text ); }