Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Why C?
« previous next »
  • Print
Pages: [1] 2 3

Author Topic: Why C?  (Read 12242 times)

zajacattack

  • Guest
Why C?
« on: December 03, 2007, 08:39:42 PM »
Why is rockbox still using the old C code? Why hasn't it upgraded to a newer language, e.g. C++, Java? Wouldn't that make it easier to manage and more consistent?
Logged

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: Why C?
« Reply #1 on: December 03, 2007, 08:51:48 PM »
I would recommend this article:

http://en.wikipedia.org/wiki/C_(programming_language)
Logged

Offline jhMikeS

  • Developer
  • Member
  • *
  • Posts: 242
Re: Why C?
« Reply #2 on: December 03, 2007, 09:00:51 PM »
Zajackattack, have you considered starting a blog?
Logged

Offline cool_walking_

  • Rockbox Expert
  • Member
  • *
  • Posts: 695
Re: Why C?
« Reply #3 on: December 03, 2007, 10:44:28 PM »
Upgrade? Java?
Logged

zajacattack

  • Guest
Re: Why C?
« Reply #4 on: December 03, 2007, 11:12:26 PM »
Quote from: jhMikeS on December 03, 2007, 09:00:51 PM
Zajackattack, have you considered starting a blog?
OK, I'm zajacattack, not zajackattack (actually, it's a common misconception; my last name is Zajac and people always want to spell it with a "k" or "ck").
Beside that point, why? I don't think there's any reason for me to, do you?
Logged

Offline GodEater

  • Member
  • *
  • Posts: 2829
Re: Why C?
« Reply #5 on: December 04, 2007, 02:48:51 AM »
Quote from: zajacattack on December 03, 2007, 08:39:42 PM
Why is rockbox still using the old C code? Why hasn't it upgraded to a newer language, e.g. C++, Java? Wouldn't that make it easier to manage and more consistent?

Could you explain why that would make it easier to manage and more consistent? We may have missed something...
Logged

Read The Manual Please

Offline nls

  • Developer
  • Member
  • *
  • Posts: 460
Re: Why C?
« Reply #6 on: December 04, 2007, 03:45:05 AM »
Also, converting a couple of thousand lines of code to another language is not exactly fun or something you do in a weekend...
Logged

Offline GodEater

  • Member
  • *
  • Posts: 2829
Re: Why C?
« Reply #7 on: December 04, 2007, 04:06:07 AM »
A couple of thousand ?

Try nearly 481,000 according to ohloh,

and according to me :

Code: [Select]
wc -l `find . -regex ".*\.\([ch]\|cxx\|cpp\)"`

I get 649,287, though this is probably including a lot of revision history too.
Logged

Read The Manual Please

Offline Bagder

  • Member
  • *
  • Posts: 1452
    • Daniel's site
Re: Why C?
« Reply #8 on: December 04, 2007, 04:21:12 AM »
The answer is this in my view:

Small embedded systems require small binaries written by cluefull people. The original Rockbox firmware binaries had to be less than 200K. Java is just not fast enough, not portable enough, wasn't free enough and isn't small and lean enough to be a good embedded choice for tiny devices. And there aren't many skilled java- programming people around in the embedded open source world.

C++ is not a good choice simply because several of us who started Rockbox just don't like C++ (nor java actually), and the fact that lots and lots of the 3rd party libs we use are plain C and we use them as unmodified as possible.

Java and C++ may have more hype and people who doesn't know things properly talk about them, but the way of C is the raw, fast, powerful and mighty way things get done in the embedded and open source world.
Logged

Offline nls

  • Developer
  • Member
  • *
  • Posts: 460
Re: Why C?
« Reply #9 on: December 04, 2007, 09:06:01 AM »
Quote from: GodEater on December 04, 2007, 04:06:07 AM
A couple of thousand ?

Try nearly 481,000 according to ohloh,


a couple of thousand, a couple of hundred thousand...

you say tomato, I say tomato  ;)

(was too lazy to check it out myself)
Logged

Offline gnu

  • Member
  • *
  • Posts: 269
Re: Why C?
« Reply #10 on: December 04, 2007, 09:12:22 AM »
Also not all compilers are available for Java or other programming languages, while C is supported by almost any compiler...
Logged

zajacattack

  • Guest
Re: Why C?
« Reply #11 on: December 04, 2007, 09:55:18 AM »
OK, so I know Java is out of the question, but what is the problem with C++?
Logged

Offline Febs

  • Member
  • *
  • Posts: 2701
Re: Why C?
« Reply #12 on: December 04, 2007, 10:03:00 AM »
I think Bagder already answered that question.
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way
Please do not send me support questions via PM.

zajacattack

  • Guest
Re: Why C?
« Reply #13 on: December 04, 2007, 10:25:52 AM »
Quote
C++ is not a good choice simply because several of us who started Rockbox just don't like C++
Well, I was curious to whether there was an actual reason other than "not liking" C++.
Logged

Offline dan_a

  • Developer
  • Member
  • *
  • Posts: 85
  • MD1CLV
Re: Why C?
« Reply #14 on: December 04, 2007, 10:29:34 AM »
C++ tends to result in large programs.  This is fine on a desktop computer with gigs of processor power, gigs of RAM and gigs of hard disk space, but is a problem on a battery powered DAP with a lot less power and capacity.
Logged
iPod 3G
iPod 4G Mono
Sansa E250
Sansa Clip

  • Print
Pages: [1] 2 3
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Why C?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.12 seconds with 15 queries.