View unanswered posts | View active topics It is currently Tue Sep 29, 2020 2:17 pm

Reply to topic  [ 1 post ] 
RobotC and the keyword 'this' 
Author Message
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1523
Post Re: RobotC and the keyword 'this'
I haven't tried the "this" keyword. But I would avoid using it since it is a keyword in C++. You don't want to confuse whoever reading the code thinking this is C++.

Having said that, RobotC is a hybrid of C and C++. It does have some C++ features. For example, it allows function parameter initialization so you can skip a parameter if you want to go default. It also supports function overloading. There are some other minor C++ features too. IMHO, it is actually confusing to me because then I don't know what are and what are not supported, so I have to constantly do experiments to figure out if it does support it. Even if it seems to support it, I don't know if the support is fully compliant with ANSI standard. In other words, when something is not quite working, is it a bug or is it just departing from ANSI standard?

In my opinion, this is especially bad for beginners learning the language because once you learned RobotC, you may think it is the standard and writing code that would work with RobotC and expecting it to work elsewhere but it may not. I am always hoping RobotC will support full blown standard C++ in the future with class, inheritance and polymorphism. At the very least, I would like to see some documents explaining the difference between RobotC and ANSI C/C++.

Wed Feb 08, 2012 3:12 pm
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.