Re: [Powertop] Why C++ is the language of implementation?
Bill Vyzas <vizasb at gmail.com>
| Newsgroups | dev.linux.lists.powertop |
|---|---|
| Message-ID | <CADy9ZNCDwf9+uNnqKVE1rjEdzJKgTw=VrTPGERggv6rxCfZ7og@mail.gmail.com> |
What the physical things will be in the case of powertop? Are we talking about device drivers and cpu measurements? Thanks On 31 March 2014 16:48, Arjan van de Ven <arjan(a)linux.intel.com> wrote: > On 3/31/2014 8:43 AM, Bill Vyzas wrote: > >> Hi all, >> >> I am curious to know why PowerTOP is using C++ as the language of >> implementation but the majority of the program is written with the C >> standards. I checked also some other >> open source programs like the Gnome Power Manager and its doing the same >> thing. >> >> I know that C++ can also call C and I also know that there are couple of >> classes on the program but why use C++ for a few classes when you can have >> structs, which are >> basically classes, instead. >> > > > C++ and objects are a very useful paradigm for certain things (especially > if they map > to actual physical things)... and powertop uses that. > > I'm not one of those people who goes overboard and sees objects for things > that are not > really objects, just pieces of data. > >
attachment.html
(text/html, 1.5 KB)
<div dir="ltr"><div>What the physical things will be in the case of powertop? Are we talking about device drivers and cpu measurements? <br><br></div>Thanks<br></div><div class="gmail_extra"><br><br><div class="gmail_quote"> On 31 March 2014 16:48, Arjan van de Ven <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div class="HOEnZb"><div class="h5">On 3/31/2014 8:43 AM, Bill Vyzas wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Hi all,<br> <br> I am curious to know why PowerTOP is using C++ as the language of implementation but the majority of the program is written with the C standards. I checked also some other<br> open source programs like the Gnome Power Manager and its doing the same thing.<br> <br> I know that C++ can also call C and I also know that there are couple of classes on the program but why use C++ for a few classes when you can have structs, which are<br> basically classes, instead.<br> </blockquote> <br> <br></div></div> C++ and objects are a very useful paradigm for certain things (especially if they map<br> to actual physical things)... and powertop uses that.<br> <br> I'm not one of those people who goes overboard and sees objects for things that are not<br> really objects, just pieces of data.<br> <br> </blockquote></div><br></div>