Reflection

4 views
Skip to first unread message

AJ

unread,
Sep 30, 2009, 5:49:09 PM9/30/09
to Noop
Do you plan on improving reflection and integrating patterns?
Reflection seems clunky in Java and could be reengineered.

Patterns could just be an object. Example,

Singleton myRegistry<HashMap> = new Singleton;

ThreadSafeSingleton myThreadSafeRegistry<HashMap> = new
ThreadSafeSingleton<HashMap>;

Factory carFactory<Car> = new Factory; //where Car is an interface or
abstract class

DAC myCourseDAC<Course> = new DAC;
myCourseDAC.getCourseByTile("The Intracacies of Writing an
Interpreter");

//steal a bit from ruby with autocreation of a DAC and dynamic methods

...Just some thinking outloud...

Nicolas Dasriaux

unread,
Oct 1, 2009, 7:09:22 AM10/1/09
to no...@googlegroups.com
What is DAC ? Is it a keyword ?


2009/9/30 AJ <ajw...@gmail.com>

Nikolay Tsankov

unread,
Oct 1, 2009, 10:01:26 AM10/1/09
to no...@googlegroups.com
I suppose it's similar to DAO or Data Access Object/Component. Auto-creation is the kind of "magic" that makes the code less readable in my opinion. 

Alex Eagle

unread,
Oct 9, 2009, 10:45:34 AM10/9/09
to Noop
Not sure I understand the code example, or what you mean by "Pattern".

One thought about reflection we are thinking about: if we store a
TypeLiteral with each object on the heap, we could get around erasure
on the JVM, at least for Noop-compiled classes.
-Alex

On Oct 1, 7:01 am, Nikolay Tsankov <n.tsan...@gmail.com> wrote:
> I suppose it's similar to DAO or Data Access Object/Component. Auto-creation
> is the kind of "magic" that makes the code less readable in my opinion.
>

Christian Gruber

unread,
Oct 9, 2009, 11:18:23 AM10/9/09
to no...@googlegroups.com
+1 on keeping type-literals on heap objects.

Christian.
--
-----
Christian Gruber
christiane...@gmail.com
Reply all
Reply to author
Forward
0 new messages