|
#31
|
||||
|
||||
|
<quote>
As for C#, it is very similar to Java. Most of the changes are purely syntactical sugar. While it may have been released to a standards body, the key part of the language, the class libraries, is still proprietary and very much tied to the Windows Operating System (WinForms being the main culprit). C# was designed with minimal portability in mind. Unlike Java, it is not write once, run anywhere. I'd be very surprised to see a change to a C# based micro-controller if only because I don't think any exist (can anyone correct me here?). <end quote> Actually C# was designed for portability. You can run it on Windows, Mac OS X and FreeBSD already and people are working on a Linux version. This does include a lot of the class libraries, though not all of the WinForms stuff. But it's still pretty powerful and less proprietary then Java. And of course you can write a program once and run it on your laptop, your cell phone, your PDA and a host of other small devices. I love the PDA emulator for testing C# PDA programs using Visual Studio .NET BTW. It's been a lot of fun to play with. Hopefully I'll have a PDA soon but I can still program for it without one. In any case the .NET framework was designed from the ground up to be portable across hardware platforms and form factors. Syntactic sugar being the only differences from Java? I don't think so. For example you can not overload operators in Java but you can in C#. And then there is the whole notion of wrapper classes for Java that you have no need for in C#. Java doesn't treat everything as an object and C# does. That's a pretty big deal in my opinion. That's just the tip of the iceberg too. I don't know of a C# microprocessor yet but one day soon I have hopes. Just my opinion not based on anything I know. |
|
#32
|
||||
|
||||
|
Alright, I'll concede that C# is a viable option -- but as Mr. Thompson says there has never been a microcontroller based upon it.
Now, some more Java bashing. I will not deny that Java is the only perfect language. Esperanto was perfect too. But the most useful languages do not necessarily have the most regular syntax. Because of the language's structure, Java compilers can static check for many mistakes that would become run-time errors in almost any other language. The trouble is that this same rigid style forbids the programmer to abbreviate, and often necessitates the circuitous style that epitomizes bad OOP. Java is C++ minus everything that has turned into one of the most widely used languages ever (second only to C). Java has no pointers, no multiple inheritence, none of the lower level features that make C and C++ so demonically fast. |
|
#33
|
|||||
|
|||||
|
I highly doubt that the language will be too far away from PBASIC. Many rookie and smaller teams won't have the man power or resources to code in a drastically different program.
|
|
#34
|
||||
|
||||
|
I don't know about that. Afterall, for a rookie team, it wouldn't be a "drastically different program[ming language]."
And anyway, with a decent default program included, and perhaps some nice comments it shouldn't be that hard to learn another language. It's just a problem of syntax afterall, and there's tons of resources available on the web.I don't know why "smaller teams" necessarily imply a lack of programming knowledge. But for the teams that indeed lack a lot of such knowledge, they probably didn't use anything but relatively simple (or should I say basic) PBASIC. And remember that Code:
x = y + z |
|
#35
|
|||||
|
|||||
|
There's this new language called "Omnicron" or something like that. It is like PBasic and C/++ in my opinion. It's quite good, and very easy to learn. Just search for Omnicron, and it should be somewhere (I can't find the link right now).
|
|
#36
|
|||||
|
|||||
|
Quote:
|
|
#37
|
|||||
|
|||||
|
Java is much more portable than C#. I can run Java with GUI's on just about every operating system known to man. I've heard speculation of being able to run C# on cell-phone but have seen no evidence. Java is built-in to most of the higher end cell phones these days.
Now, as far as syntatic sugar goes, operator overloading is by definition syntatic sugar. All it adds is a way of writing code a bit more simply. It doesn't add anything new to the programming language. There also was a mention of the fact that C# treats all data types as objects whereas Java doesn't. This is true. Whether or not this is really a benefit is debatable. Java does, however, provide object wrappers for the primitive types which should provide all the featuers that C# does. The main disadvantage to C# is that it's not a particularly mature language. It's also being pushed by a company that hasn't been known for cross-platform compatibility in the past. As far as Java removing all the "good stuff," from C++, that's not really true at all. C++ have some features that can make it fast. It also has a lot of features that are very easy to screw up (multiple inheritance, operator overloading, pointers, memory management). Java was a language that was designed to be easy to program in. Often times, with the speed of today's computers, using Java is just as fast as C++. I think the key factor in designing a program is picking the right language for the job. There is no one right language for everything so don't think there is. As for (x y +), that's postfix notation. Writing something as (+ x y) is prefix notation. What we're used to (x + y) is called infix notation. Postfix and prefix are easy to parse which is why some languages (namely, LISP) as well as some calculators (HP's) use that method for input of mathematical expressions. Postfix is also sometimes referred to as Reverse Polish Notation but I believe that may be a bit derogatory. Matt |
|
#38
|
||||
|
||||
|
All in all...
OK. In review ...
Whatever language we end up with, it seems pretty well established that it'll be one of the following. I present this list in order of my estimation of likelihood. 1. Faster PBASIC 2. Another BASIC dialect 3. Java 4. C 5. C++ Let's compare them. [P]BASIC: +Easy to learn, a derivative of one of the oldest computer languages. -Limiting in that it provides only for sequential programming (arguably a fitting model for some strategies), difficult to program in a structured fashion Java: +Object-oriented, maniacally so. Syntactically ideal, inherently prevents many kinds of logic errors. Portable, not too difficult to learn. Already popular. -Restrictive syntax often complicates coding. Syntactic sugar counts for something. C: +Popular, ubiquitously so. Reliable, preposterously fast. Very common in microcontrollers. Enormous base of knowledge. -Much more difficult than Java and BASIC. Generally compilers don't catch all the dumb errors Java does. C++: +Proven to be just about as reliable as C. OOPic like Java. Permits lower-level operations, like pointer operations and memory management. Plenty of syntactic sugar. -A wee bit slower than C. The most complicated syntax of all four languages. Arguably the most difficult to learn. As promising as many newer languages -- like Python, this Omnicron, and so forth -- may be, I don't give them any serious consideration as a candidates for FIRST. Plus it's rare to find such languages in embedded packages except, of course, in single-board Linux machines. And those can be expensive. |
|
#39
|
|||||
|
|||||
|
Re: All in all...
Quote:
The link to Omicron is here: http://www.strandmark.com/omicron.shtml |
|
#40
|
|||||
|
|||||
|
Re: Re: All in all...
Quote:
Matt |
|
#41
|
|||||
|
|||||
|
Re: Re: Re: All in all...
Quote:
|
|
#42
|
||||
|
||||
|
I've seen C# programs on cell phones. Seems to work fine. I haven't seen Java on a cell phone though I hear it works.
|
|
#43
|
||||
|
||||
|
Quote:
|
|
#44
|
||||
|
||||
|
Quote:
|
|
#45
|
||||
|
||||
|
I would remind you that "most" and "all" are not the same thing.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is your most prefered programming language? | Hailfire | Programming | 156 | 19-01-2005 21:42 |
| 2004 Championship Eligibility Criteria!!! | dez250 | General Forum | 214 | 28-12-2003 20:11 |
| Championship Qualification - How you would've done it | Ken Leung | Championship Event | 6 | 26-10-2003 14:00 |
| Making heads or tails of the new announcement... | Jessica Boucher | General Forum | 66 | 26-09-2001 11:13 |
| TI programming using Z80 assembly language | Jeff Wong | Chit-Chat | 1 | 07-06-2001 01:27 |