Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   New programming language next year? (http://www.chiefdelphi.com/forums/showthread.php?t=20970)

Alfred Thompson 11-06-2003 12:53

<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.

leo_singer 11-06-2003 13:57

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.

Joe Matt 11-06-2003 16:50

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.

mtrawls 11-06-2003 18:35

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
is pretty much the same in any language (we won't get into the wonder that is Scheme).

Raven_Writer 11-06-2003 18:38

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).

JLambert 11-06-2003 23:08

Quote:

Originally posted by mtrawls
Code:

x = y + z
is pretty much the same in any language (we won't get into the wonder that is Scheme).

Or my personal favorite, prefix notation (Y = YZ+) which is apparently used in a couple lesser known forms of C++ and PASCAL.

Matt Leese 12-06-2003 08:28

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

leo_singer 12-06-2003 09:55

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.

Raven_Writer 12-06-2003 11:59

Re: All in all...
 
Quote:

Originally posted by leo_singer
...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.
Python is new(er)? I thought it was old...since Delphi is based off of it.

The link to Omicron is here: http://www.strandmark.com/omicron.shtml

Matt Leese 12-06-2003 15:41

Re: Re: All in all...
 
Quote:

Originally posted by Raven_Writer
Python is new(er)? I thought it was old...since Delphi is based off of it.

Delphi (the programming language) is based off Pascal (it's Object Pascal). It is not based on Python. Python derives elements from a variety of languages but isn't based on anything. Where does this idea that Delphi is based on Python come from? I think Delphi is older than Python.

Matt

Raven_Writer 12-06-2003 15:43

Re: Re: Re: All in all...
 
Quote:

Originally posted by Matt Leese
Delphi (the programming language) is based off Pascal (it's Object Pascal). It is not based on Python. Python derives elements from a variety of languages but isn't based on anything. Where does this idea that Delphi is based on Python come from? I think Delphi is older than Python.

Matt

I got Pascal and Python mixed up, sorry about that.

Alfred Thompson 12-06-2003 16:00

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.

Adam Y. 12-06-2003 17:06

Quote:

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.
I was reading a video game magazine and as it turns out a lot of games that are on cell phones are java based.

Scudzey 13-06-2003 18:10

Quote:

Originally posted by Alfred Thompson
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.
Sorry to correct you on this one, but cellphones use the J2ME is used on most cell phones for their applications. You can read on here .

Alfred Thompson 13-06-2003 19:27

I would remind you that "most" and "all" are not the same thing.


All times are GMT -5. The time now is 14:21.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi