[openbeos] Re: Innovation: Design and Programming

  • From: "Michael Phipps" <mphipps1@xxxxxxxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Tue, 29 Apr 2003 19:32:23 -0400

Ah. A language flame war. Mmmmm. Been a long time. 
Unfortunately, it doesn't belong here. :-/ 
I will kick the "discussion" up to a level that does make some reasonable 
contribution, though:

Pascal and C are (with some minor tweaks here and there) semantically equal. 
Yeah, really.
It is a *mechanical* translation to go between the two. p2c is a pretty good 
example. There are things
that *some* pascal's lack that make going the other way harder. And some of 
those are intended omissions.

C++ can (I don't know if anyone has) be "converted" to other languages, too. I 
think that a java-->C++ 
conversion would be doable. Of course, cfront converts C++ to C.

Be chose C++ as their API implementation. I don't think that it is really fair 
to say that Be succeeded IN SPITE OF C++. When I compare the Amiga API to the 
BeOS API, I think that the BeOS API is *FAR* superior in semantics, although 
the functions/methods aren't all that different. C++ is just more intuitive in 
terms of namespace partitioning (by that I mean that since BeOS "objects" are 
C++ objects, their methods are in their own namespace). With a C api, you have 
all sorts of possible collision issues. 

Is all of this intended as a subtly way of being a C++ bigot? NO. I see its 
faults, too. I am leaning more and more toward a simplified Python as a better 
language. Python is neat. It has a lot of the features that I would like in a 
language. But I think that there is a little "too much" in it, AFAICT. Remember 
back in the day when you would write 
10 print "I am cool!"
20 goto 10

And you were just all impressed with your mad skillz? (OK, maybe not). 
In economics, they call that a "low barrier to entry". Generally, it increases 
competition because more companies can compete for the business. I think that a 
low barrier to entry in code is a good thing, too. A similar program in C is 5 
lines long (depending on style) are requires you to learn to use the compiler, 
linker and to look at your output on the command line. Ouch. Other languages 
aren't much better. And yes, IDEs somewhat alleviate this (and also make it 
worse in some ways).

The relevant part of all of this to openbeos is this - 

Be did very little to make BeOS accesible to other languages. Their answer was 
"write the interpreter/run time environment in C++ and access our code that 
way". And that is a fairly reasonable answer, from the POV that the OS was 
still rapidly mutating. But, looking forward, it is not impossible to see a 
future where some of the pieces are slow to change their API. There are only so 
many ways that you can skin a screensaver API, for example. So what sort of 
ways can we make some allowance for other languages?

Well, since this is getting long, I will end here...

>Try again:
>
>#define BEGIN {
>#define END ; }
>#define IF if (
>#define THEN ) {
>#define ELSE ; } {
>
>
>There is no ENDIF in Pascal, and the END above will suffice; Pascal
>does not permit a semicolon in front of an ELSE, so in the case of, for
>example:
>
>IF boolExpr THEN
>    WRITELN('true')
>ELSE
>    WRITELN('false');
>
>1. You need to compensate for the missing semicolon before the ELSE
>2. You need to recognize the ' as a STRING delimiter, instead of just a
>character
>3. You need to provide for WRITELN (a library function?)
>
>etc...
>
>So C cannot do a COMPLETE Pascal play-along.  And what about TYPE, VAR,
>NESTED PROCEDURES AND FUNCTIONS, well-structured UNITs/MODULEs, etc...
>
>
>
>--- François_Revol <revol@xxxxxxx> wrote:
>
>> Besides...
>> #define BEGIN {
>> #define END }
>> #define IF if (
>> #define THEN ) {
>> #define else } else {
>> #define ENDIF }
>> guess who is superior now ?
>> (believe me, I actually saw it in the source code of a BeOS driver !)
>
>
>=====
>=======
>Frank D. Engel, Jr.
>
>Modify the equilibrium of the vertically-oriented particle decelerator to 
>result in the reestablishment of its resistance to counterproductive 
>atmospheric penetration.
>
>__________________________________
>Do you Yahoo!?
>The New Yahoo! Search - Faster. Easier. Bingo.
>http://search.yahoo.com
>
>




Other related posts: