[A86] Alternative Language compiler for the z80.


[Prev][Next][Index][Thread]

[A86] Alternative Language compiler for the z80.







>From: "David Phillips" <david@acz.org>
>Reply-To: assembly-86@lists.ticalc.org
>To: <assembly-86@lists.ticalc.org>
>Subject: [A86] Re: ROM / RAM equates database
>Date: Mon, 24 Sep 2001 19:40:44 -0700
>
>...  I've thought about this a lot.  C isn't exactly the best language
>for development on the calc.  It has a lot of features that are not
>necessary, and things that can't be done.  For example, there's no good way
>of doing relocatable code, libraries, separate modules, etc.  Perhaps a
>simpler C like language that was geared towards generating optimized code
>would be better.  If you ever saw Turbo Pascal demos written in the late
>80's and early 90's, then you know what I'm talking about.  The programs
>would be mostly inline assembly, with Pascal just as the glue holding it
>together.  Something like this would be very nice to program in, and would
>generate optimized code.  I might actually still write a calc program from
>time to time if there were something like this :)
>
>If someone or a group is interested in designing this language, I would be
>willing to implement the compiler and toolchain for it.  It would be very
>preferable to have this language be context free, in order to keep the
>parser from being over complicated.  Depending on how complicated the
>language is, it might even be possible to have an on-calc compiler.

I have literally had these same thoughts off and on for the past year or so. 
  I have not been able to visualize what this new language should be.  
Should it be a strict subset or C, or should it be something completely 
different?  I feel intuatively that such "small-impact" language should be 
possible.  I especially like the idea of an on calc compiler.  Here are a 
few possible features that I see this "X" programming language having:

(1) Language should be procedural - (unless someone can produce a 
satisfactory simplistic OO model)

(2) Java style object file production - In other words, one object file 
being produced for one source file.  None of this header file buisness.

(3) Possibly loosely typed - I'm still not sure about this one.  Strong 
typing would be nice, but is it neccessary?

(4) Pointers - Full pointer support, including function pointers

(5) Structs - Full support for multilayer structs.

(6) Base Types - This part has perhaps bothered me the most about language 
X.  I've always loved programming in C and C++, but I've always felt that 
the choice of base compiler types was awkward.  I'm sure there is an ANSI 
standard for it, but just because it is standardized doesn't make it feel 
less akward.  You have int, char, float, long.  This might not get a 
positive response from my fellow programmers, but I suggest that langauge X 
have a single base type as the "byte".  To me this is simple and elegant.  
All other types would be derived from this somehow within the language.

(7) Operator Support - This has also bothered me quite a bit.  How should 
operators be handled in the language.  It seems to me that operators are no 
more than syntatical sugar for "special" functions.  Usually I percieve 
"special" features as inelegant and unclean.  I've always leaned towards 
simple consistant interfaces.  C appears to provide two interfaces for 
simular things: functions and operators.  But I can't invision a langauge 
maid entirely of operators or one made entirely of function calls.  Just 
take a look at LISP/SCHEME syntax for this idea taken to the extream.  Yet I 
don't know how the new language should handle this.

Anyway, that is a partial brain dump of things I've thought about.  A 
descussion in this forum might not lead to any more clear a vision than i 
already have in my head, but you never know.  Its funny, I feel totally 
capable of working with any laungage but I can't articulate to myself a 
simple new language to meet the properties expressed by David Phillips 
above.  Maybe this means such language doesn't exists.  (hardly a proof 
though 8-) ).

later,

David E. West



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp





Follow-Ups: