On Friday, March 02, 2012 02:30:18 PM, Jack Chastain wrote: > On Fri, Mar 2, 2012 at 1:37 PM, Chris Knadle <[email protected]>wrote: > > On Thursday, March 01, 2012 02:44:48 PM, Jack Chastain wrote: > > ... > > > > > How ... timely. I am taking Intro to Java Programming all this week. It > > > hurts my head a bit. My old procedural brain just can't flex into the > > > OO paradigm as easily as it once could do other similar work - like > > > learning RPN and thinking it was cool. > > > > I make you a bet it's not simply the OO parts of Java that are hurting > > your head, but rather the /event driven/ portions. > > I am at the stage where I don't know enough about exactly what it is that > hurts my head. I think it is merely the syntax.
Concerning Java I agree with you. Even as an experienced C++ programmer, I don't like Java. > i.e. Object Orientated programs > > > can still be written in a proceedural way, in which case "OO" is simply > > used > > as a container for data + code, but the code outside of the objects is > > still > > procedural, whereas in event driven programs that isn't the case. > > Understood (and maybe the examples of an OO designed system being written > in a procedural way has somethign to do with it?) > > Really though, I think it is just a little confusion with commands to > create things of the sort: > > Thing SomeThing = new Thing(); I agree it's a bit quirky, but I can at least offer the following explanation: The "Thing" on the left-hand side is defining the variable Type for SomeThing. The "new" is for dynamic memory allocation, similar to "malloc" from C, if you're familiar with that. "Thing()" is on the right-hand side because the "new" call has to now how much memory to allocate, and possibly how to structure it. i.e. the two references to "Thing" are used similar but subtly different ways. > My head keeps saying "Why is Thing in there twice?? It should be once...." When I was learning C++ I had the same thought. > I won't even bother mentioning the specification of double or long > variables against their formatting specifications ... oh wait - I just did. > > I am certain that when I hit "Part II" in three weeks, part of the ache > will have subsided into some small degree of understanding. I have faith that will be the case. -- Chris -- Chris Knadle [email protected] _______________________________________________ Mid-Hudson Valley Linux Users Group http://mhvlug.org http://mhvlug.org/cgi-bin/mailman/listinfo/mhvlug Upcoming Meetings (6pm - 8pm) Vassar College Mar 7 - Desktop Shootout - 9th Anniversary of MHVLUG Apr 4 - An Intro to Chef May 2 - May 2012 Meeting
