Posted: Sun Aug 19, 2007 3:07 am
Is this c++ class-type side-effect? or irrelevant?pcmattman wrote: In this time, Mattise has been switched from a monolithic design to a microkernel design.
The Place to Start for Operating System Developers
http://f.osdev.org/
Is this c++ class-type side-effect? or irrelevant?pcmattman wrote: In this time, Mattise has been switched from a monolithic design to a microkernel design.
Irrelevant. I work better under an OOP environment, that's all. Linked lists are so much easier when you can use a template class instead of rewriting code for every new type.binutils wrote:Is this c++ class-type side-effect? or irrelevant?pcmattman wrote: In this time, Mattise has been switched from a monolithic design to a microkernel design.
I heard that Both(with or without) is possible, i compiled and installed it on windows and linux without STL.pcmattman wrote:Doesn't Boost require the STL?
And you then ofcourse need a permission map for each different type of access talk about efficient memory usage. Friends are only needed when you wish to hide implementation details for all other classes. And the operator = is related to the whole class not only its members. Personally i don't use friend classes.jerryleecooper wrote:For exemple, the whole public/private thing. To have a class accessing private members of another class you make a friend of it. Why not instead have some kind of permission map, having some variables of a class that are publicly readable, but not writable, and inversely? You can do that by overloading the = operator?
Not every variable just the ones you need to expose in the interface. Think of an old analog clock. You could have the hour minute and second as private member variables and set_clock or get_clock as the public functions (set_hour/get_hour etc can also be done). That the interface of the clock. However the whole innerworkings of the wheels and the number of teeth per wheel how they are connected and everything is all done in private space and don't need to be exposed. Thus don't need the access functions.jerryleecooper wrote:And there's this thing they teach in the C++ books I have, make a variable private, but with a function to read it's value public, and a function to set its value, also public. And they're also saying you're supposed to do that to EVERY variable. Crazy.
OK, so I put some formating into the set_hour function, instead of relying on each place in my code where I want to set the hour.os64dev wrote:Think of an old analog clock. You could have the hour minute and second as private member variables and set_clock or get_clock as the public functions (set_hour/get_hour etc can also be done). That the interface of the clock. However the whole innerworkings of the wheels and the number of teeth per wheel how they are connected and everything is all done in private space and don't need to be exposed. Thus don't need the access functions..
So if you don't like it, don't use itjerryleecooper wrote: I think C++ is like GUI for programmers.
Im using it when im programming in windows, and it's a joy. But I don't use the features I don't like.AJ wrote: So if you don't like it, don't use it
MFC will put anyone off C++.jerryleecooper wrote:Im using it when im programming in windows, and it's a joy. But I don't use the features I don't like.AJ wrote: So if you don't like it, don't use it
Then don't use MFC. You can use the C-headers of the Win32 SDK if you want.pcmattman wrote:MFC will put anyone off C++.jerryleecooper wrote:Im using it when im programming in windows, and it's a joy. But I don't use the features I don't like.AJ wrote: So if you don't like it, don't use it