Re: Re: Pragmatic Requirements Summary : update

Aaron Optimizer Digulla <[email protected]> Mon, 4 Aug 2003 22:37:21 +0200
Newsgroups gmane.comp.programming.pragmatic
Message-ID <[email protected]>
On Mon, Aug 04, 2003 at 03:04:54PM -0500, Brian Hurt wrote:

> > > The question is: C works perfectly well for low-level driver 
> > > programming.  Why invent another language which tries to 
> > > solve an already solved problem? 
> >
> > Becuase in general we want one language in which we can do both low
> > level and high level work. Even when you are doing low-level work it
> > would be nice to work in a hll in those areas of the application that
> > don't need direct access to memory or other low level features.
> 
> Speaking as someone who does drivers/embedded code professionally, the
> only way you are going to replace C in this niche is with a language that
> can also be used as a hardware description language, making it easy(-ier)  
> to move functionality between hardware and software.  I.e. you replace C 
> and Verilog/VHDL at the same time.  As that isn't the goal here, I'd 
> advice you ignore this particular problem domain and focus elsewhere.

When I read Erics answer to my post, I was thinking exactly this.

Let me elaborate: In one of the earlier posts, I said I wanted to
be able to add new syntax to the parser.

VHDL could be such a new syntax. Then, you could mix VHDL with
"normal" Pragmatic code.

Another idea would be what the Amiga had in a custom.h file.
This file contained a large structure which could be mapped
to a certain area in memory. When you changed values of the
structure, you actually modified hardware registers of various
custom chips.

In the end, Pragmatic should allow to put a very thin layer of
contraints over the hardware which means that *one* person, who
develops the chip writes an extension of Pragmatic for that chip
and everyone else just says "Set the color of register 5 to green".

This way, all the pointer arithmetics and tricks can be encapsulated
in a much better way than if you had to use macros or peek/poke
directly and one person can write just a tiny bit of code which
defines the interface.

So, for example, the code about could read:

    gary.color6 = "green";

In the background, gary is the wrapper object which knows about
the Amiga Gary chip (drives the display). It knows that it expects
a color when you try to set "color6" and the compiler could then
elsewhere define the sematics how to turn "green" into a "color"
and "gary" could give hints how he would like to have the color.

-- 
==============================================
Sowatec AG,       CH-8330 Pfäffikon (ZH)
Witzbergstr. 7,   http://www.sowatec.com
Tel: +41-(0)1-952 55 55
Fax: +41-(0)1-952 55 66
----------------------------------------------
Aaron "Optimizer" Digulla, [email protected]
==============================================

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/sO0ANB/LIdGAA/ySSFAA/W4wwlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
pragmatic_lang-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/