Does Java have something similar to .Net's reflection?
Wikileaks To Leak 5000 Open Source Java Projects
31–40 of 140 posts
Re: Wikileaks To Leak 5000 Open Source Java Projects
#32In a global header long time ago, a friend of mine (and big "C" lover) did this to his best buddy once (a C++ and especially boost lover): #define class struct #define private public #define protected public
continued "fun" (read dangerous) redefines: #define true false #define false true #define true 0 #define false !true #define if while #define continue break :)
Re: Wikileaks To Leak 5000 Open Source Java Projects
#33Christ, this guy never ceases to amaze. His talk at I/O a couple years ago was absolutely fantastic: http://www.youtube.com/watch?v=BttI-y9VzXQ
Re: Wikileaks To Leak 5000 Open Source Java Projects
#34Re: Wikileaks To Leak 5000 Open Source Java Projects
#35Earlier quoted context omitted.
The issue is less about encapsulation and more about language-enforced encapsulation. Encapsulation is good, but encapsulation that's enforced by the language is debatable.
If the language isn't enforcing the encapsulation, how is it encapsulated? For me, encapsulation comes down to "What I hide, I can change. What I expose, other types may couple to in an inappropriate way."
Re: Wikileaks To Leak 5000 Open Source Java Projects
#36"If I buy you a house and put the title in your name, but I mark some of the doors 'Employees Only', then you're not allowed to open those doors, even though it's your house. Because it's really my house, even though I gave it to you to live in." Love it!
Yeah, it's fine for our software but not their music
Re: Wikileaks To Leak 5000 Open Source Java Projects
#37In a global header long time ago, a friend of mine (and big "C" lover) did this to his best buddy once (a C++ and especially boost lover): #define class struct #define private public #define protected public
(While being quite funny, mind you!)
Re: Wikileaks To Leak 5000 Open Source Java Projects
#38Re: Wikileaks To Leak 5000 Open Source Java Projects
#39Re: Wikileaks To Leak 5000 Open Source Java Projects
#40Earlier quoted context omitted.
The issue is less about encapsulation and more about language-enforced encapsulation. Encapsulation is good, but encapsulation that's enforced by the language is debatable.
If the language isn't enforcing the encapsulation, how is it encapsulated? For me, encapsulation comes down to "What I hide, I can change. What I expose, other types may couple to in an inappropriate way."
What do you mean by "enforce"? Java's private modifier doesn't enforce encapsulation. Javascript's objects do not have a private modifier, but still provides encapsulation via closures. It's hard to have a meaningful discussion when loose terms like "enforce" are thrown around.