Archive for the '1' Category
Static typing for warp-widgets
I have been thinking about this for awhile, currently warp-widgets templates are duck typed. I want to make them statically typed (as crazybob encouraged me to). There are two parts to this.
Part #1
I had intended the widget annotations to be java annotations, which can be used to configure user-widgets dynamically…in the template:
@My(name=”Jeff”)
<div>… </div>
…and in the class:
@EmbedAs(My.class)
public [...]
Filed under: 1 | 2 Comments
Tags: guice, java, type system, type theory
Generics are at once the most welcome, easy to understand and most perplexing feature added to Java since… well ever! I couldn’t imagine life without them, but like anything in type theory they are at times confoundingly opaque. Here are some all-too-common misconceptions about Java Generics and Generic types in general:
Set<Child> is a subtype of [...]
Filed under: 1 | Leave a Comment
Tags: closures, generics, guice, java, type system, type theory
When consulting with a colleague, recently, I ran into an interesting use case: in order to monitor live performance, we needed to count the number of method invocations on a service (read: EJB/remoted call). Actually, it was a number of such services. The obvious answer was to place an interceptor around each method call, and [...]
Filed under: 1 | 2 Comments
Tags: concurrent, counting, data structure, hashtable, java, lock-free, threading, wait-free
Thoughts on CICE (closures?)
CICE is a proposal by Doug Lea, Josh Bloch and ‘Crazy’ Bob Lee. It is being touted as a “closures” proposal for Java 7 alongside Neal Gafter’s BGGA (for instance). Here are some thoughts I had after reading their document:
So basically, CICE is syntactic sugar for anonymous classes. In Guice parlance, the following:
bind(Service.class).toProvider(new Provider<Service>() {
public Service [...]
Filed under: 1 | 4 Comments
Tags: closures, guice, haskell, lambda, scheme, type system