View Single Post
  #19   Spotlight this post!  
Unread 09-02-2007, 00:42
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: What is Easy C good for?

I have to weigh in on the con side, here.

I have, in fact, used EasyC. I can see its usefulness at a high level. But as you start drilling down, it becomes more cumbersome.

Examples:
Math - Everything has to be in temporary variables or you inline C code.

Preprocessing - I didn't look much into this, but I'm not sure about EasyC's preprocessor support. I use it extensively, and, frankly, I'm not sure I could do in EasyC what I do in text editors (again, inline C doesn't count).

Inline Assembly - I have, in fact, briefly considered this for real robot code from time to time. I somehow doubt that EasyC supports it.

Now, comparing EasyC to MPLAB is not really a fair assessment. MPLAB is some of the worst software I have had to the misfortune of working with (along with MCC18, CoreChart, and IFI Loader). Comparing EasyC to, say, a well-equipped copy of Eclipse (or some of the other IDE) would probably be fair (maybe even unfair against EasyC!). I doubt EasyC could handle Subversion, compiling for multiple controllers, concurrently open projects, or the search capabilities (Where is this thing declared and defined? Where do I reference it?). That's not even getting into the multiple languages Eclipse can support (I have used python in my FIRST code, and not for the Makefile).

The only way I saw myself using EasyC was to write the high-level code and writing the actual hardware "drivers" in a separate library in C.

Of course, this is also with 3 years of code behind me. I don't have a "library", per se, but I do have a set of macros, functions, etc. that I reuse, plus a "standard" code layout. I mean, how many different ways can you implement a PID loop?

As for the "EasyC challenge", there's a difference between "can do in EasyC", "can do easily in EasyC", and "have to use inline C code to do it". eg, You can do some sick stuff in the preprocessor:
Code:
#define LINE(txt) #txt "\r\n"
#define PID_VARS(prefix) int prefix##_pid_p, prefix##_pid_d; static int prefix##_pid_i
#define MSG(fmt) #__FILE__ ":" #__LINE__ ": " #fmt "\r\n"
I have considered using all of these in FIRST code (except the last one, but I really should). (OT: Does MCC18 support variadic macros?)

Please correct me if I'm wrong, here.

My $.02

Last edited by Astronouth7303 : 09-02-2007 at 01:06. Reason: Typos