Pattern Enforcing Compiler

11 views
Skip to first unread message

David McKinnon

unread,
Apr 24, 2007, 1:48:25 PM4/24/07
to Metro Detroit Enterprise Application Developers
I thought I posted this earlier....

I think the group might find this open source project on java.net
interesting.


https://pec.dev.java.net/

https://pec.dev.java.net/nonav/frontpage.html

A Pattern Enforcing Compiler™ (PEC™) For Java™

A pattern enforcing compiler (PEC) allows classes to be marked as
having a given design pattern, e.g. Singleton. The PEC then checks
that the marked class conforms to the pattern and issues an error
message if it does not, thus the pattern checking is much like type
checking. The PECs downloadable from this site require no new syntax
and therefore they can be used with existing: editors, IDEs, pretty
printers, etc. The downloadable PECs are extensible and therefore as
well as using the supplied patterns a programmer can write their own
patterns and have the PEC enforce these

David McKinnon

unread,
Apr 24, 2007, 1:19:23 PM4/24/07
to Metro Detroit Enterprise Application Developers, ste...@gmail.com
I stumbled across this open source project while on www.java.net

I thought the group might find it interesting.


A Pattern Enforcing Compiler™ (PEC™) For Java™


"A pattern enforcing compiler (PEC) allows classes to be marked as
having a given design pattern, e.g. Singleton. The PEC then checks
that the marked class conforms to the pattern and issues an error
message if it does not, thus the pattern checking is much like type
checking. The PECs downloadable from this site require no new syntax
and therefore they can be used with existing: editors, IDEs, pretty
printers, etc. The downloadable PECs are extensible and therefore as
well as using the supplied patterns a programmer can write their own
patterns and have the PEC enforce these"


https://pec.dev.java.net/

https://pec.dev.java.net/nonav/frontpage.html

Ilya Sterin

unread,
Apr 24, 2007, 5:41:32 PM4/24/07
to David McKinnon, Metro Detroit Enterprise Application Developers
Yeah, sounds useful when learning patterns, though I doubt it can be
used in a large application. Patterns fortunately are abstract
solutions to a related set of problems, though a single pattern might
have hundreds of different reifications. It seems like the compiler
forces you into some standard or common pattern reification, with
their own naming conventions, etc... So again, I'm not bashing it,
but rather saying that it might be useful for learning.

Ilya

David McKinnon

unread,
Apr 25, 2007, 9:32:57 AM4/25/07
to Metro Detroit Enterprise Application Developers
Yes. I found it more a curiosity at first but the potential as a
learning tool seems high. I wonder if this could also be leveraged in
a QA or code review capacity.

On Apr 24, 5:41 pm, "Ilya Sterin" <ster...@gmail.com> wrote:
> Yeah, sounds useful when learning patterns, though I doubt it can be
> used in a large application.  Patterns fortunately are abstract
> solutions to a related set of problems, though a single pattern might
> have hundreds of different reifications.  It seems like the compiler
> forces you into some standard or common pattern reification, with
> their own naming conventions, etc...  So again, I'm not bashing it,
> but rather saying that it might be useful for learning.
>
> Ilya
>

> On 4/24/07, David McKinnon <davidmck...@gmail.com> wrote:
>
>
>
> > I stumbled across this open source project while onwww.java.net
>
> > I thought the group might find it interesting.
>
> > A Pattern Enforcing Compiler™ (PEC™) For Java™
>
> > "A pattern enforcing compiler (PEC) allows classes to be marked as
> > having a given design pattern, e.g. Singleton. The PEC then checks
> > that the marked class conforms to the pattern and issues an error
> > message if it does not, thus the pattern checking is much like type
> > checking. The PECs downloadable from this site require no new syntax
> > and therefore they can be used with existing: editors, IDEs, pretty
> > printers, etc. The downloadable PECs are extensible and therefore as
> > well as using the supplied patterns a programmer can write their own
> > patterns and have the PEC enforce these"
>
> >https://pec.dev.java.net/
>

> >https://pec.dev.java.net/nonav/frontpage.html- Hide quoted text -
>
> - Show quoted text -

Reply all
Reply to author
Forward
0 new messages