New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

C or C++


Post Reply New Thread Subscribe

 
Thread Tools
Simbad54

 
Simbad54's Avatar
 
Member Since: Mar 04, 2007
Location: Amsterdam, Holland
Posts: 366
Simbad54 has a spectacular aura about
Mac Specs: Mac Book Pro. 2.4Ghz Intel Core Duo running OSX 10.9.3, 8GB Ram

Simbad54 is offline
Hi guys,

I haven't been here for a LONG time!
A quick question.
I'm looking to start learning a programming language with an end goal of working with some simple robots. I'm less interested in writing apps, although that may become more interesting to me as time goes on.

So, I get the impression that I should go with C rather than C++, but I'm not really sure of the differences.

Can anyone point me in the right direction?

Thanks in advance.

Sim
QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
I would think it would depend on the robot frameworks. Is this something you are doing from scratch or are these robot kits with some documentation of the coding features? Really, you need to answer this question before moving forward on language selection.

C++, Objective-C, etc tend to have extensive libraries today. Straight C is sparse in comparison. Using big libraries may cause you to require much more memory in your robots. Something I suspect would be limited resource.

C++ adds in complication to gain it's object oriented features. Being new to programming, you might not want to jump into that extra difficulty.

CameraTime - Time lapse photography for novice and advanced users.

When asking questions, post the version of your software. You'll receive better answers.

Please post your results to the thread as it is good feedback.
QUOTE Thanks
Simbad54

 
Simbad54's Avatar
 
Member Since: Mar 04, 2007
Location: Amsterdam, Holland
Posts: 366
Simbad54 has a spectacular aura about
Mac Specs: Mac Book Pro. 2.4Ghz Intel Core Duo running OSX 10.9.3, 8GB Ram

Simbad54 is offline
Thanks xstep for your reply.
In answer to your question, I am looking to develop some very simply robots at a later date, probably from scratch.
I have come across some systems, one in particular called brainstem, which is a ready to use control environment for a robot, and I believe it uses C.
I don't know where this may lead, but I would like to not waste time learning a language that would end up being redundant at a later date, for my purposes.

Thanks again.
Sim

I am right at the beginning of all this, and from what you say about extensive libraries, it would seem that C was a better option.
Essentially, robotics is about controlling sensory and motor systems, so perhaps doesn't need a vast library.
QUOTE Thanks
wmprice1240

 
Member Since: May 02, 2009
Posts: 480
wmprice1240 has a spectacular aura about
Mac Specs: MBP 2.33 4GB: MacPro 8 Core 2.8, 16GB: MacMini 2.26 4GB: MacMin 2.53 4GB: iPhone3GS 32GB

wmprice1240 is offline
In furtherance of xstep's point, you can never really go wrong with C. It's fairly easy to learn (in some respects) and quite a few other languages (Obj-C, C++, Java etc) all share syntactic similarities. While the spirit and idioms of these languages may be dramatically different, at the very least, the syntax won't be such a shock if you ever choose to move on to something different.

Also, most low level code dealing with hardware typically is done in C: device drivers etc for the reasons xstep has already mentioned.
QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
Quote:
Originally Posted by Simbad54 View Post
Essentially, robotics is about controlling sensory and motor systems, so perhaps doesn't need a vast library.
Likely any libraries you'll need will be available in the option you buy into. They also are likely to be efficient tight code. In fact, I'd say research this side of the issue. Some companies may have better developed systems than others.

Look to see how well your companies of choice are supported by the outside world. This can make learning and getting detailed information easier. Also, does the company have use forums.

Consider the open source community for support. Things you may want to do could have already been coded for you. Of course there are possible licensing issues with this option. The thing is, you could at lease look at the code to see how someone else thought to solve a problem.

Sounds like a fun and challenging thing to get into.

CameraTime - Time lapse photography for novice and advanced users.

When asking questions, post the version of your software. You'll receive better answers.

Please post your results to the thread as it is good feedback.
QUOTE Thanks

Post Reply New Thread Subscribe


« equivalent of gpupdate for OS X 10.5.7? | I'm new at this...editing open source programs? »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

All times are GMT -4. The time now is 08:01 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?