On 15 Oct 2008, at 09:35 , Sebastien Lelong wrote:

>> More seriously, I really don't why we shouldn't build libs over  
>> other libs (of course, obviously, if it's done right). Your  
>> example about device libs, format.jal and print.jal is not an  
>> example of this, I can't see any "include" in them. They abstract  
>> the device, that's all (and that's good).
>
> You did quite a radical turn on this, but I have to agree.
>
> ??? What radical turn ? About having libs that abstract device, as  
> lcd ?
> [..]
> NO, NO, NO, NO. Here are misunderstanding again... Where do you see  
> that I mean no "include" on libraries ? I say exactly the  
> opposite ! Read again: high_level_lib.jal *includes*  
> low_level_lib.jal.

We have a serious miscommunication here.

> I really don't why we shouldn't build libs over other libs (of  
> course, obviously, if it's done right).

There is a verb missing in this sentence, but I read it as:

> I really don't see why we should build libs over other libs (of  
> course, obviously, if it's done right).

Which is quite different to what you meant :-)


Let me explain my proposal:

The old JAL included a lot, also inside the libraries. I didn't like  
it. Apart from stack issues, I would like to include everything in  
one spot (say, one page of source) where you can clearly see what is  
included and what not.

Example:

include delay_any_mc

const baudrate = 9600
include serial_hardware

include co2_t6603

var bit TC77_SIO is pin_a0
pin_a0_direction = input
var bit TC77_SCK is pin_a1
pin_a1_direction = output
include temperature_tc77


All libs use delay_any_mc, and co2_t6603 uses serial_hardware.

If you want to use co2_t6603 with serial_software, and it includes  
the serial_hardware INSIDE the lib, you have to hack it.

My proposal: libs may only use 'put and 'get functions (which are lib- 
independent) to interact with other libs.
We could make an exception for a "library family" like the PWM libs  
that consist of a main lib and sublibs for every pin.
Still, this can be done without "includes", but a certain include  
order would be needed, like:

include pwm_common
include pwm_ccp1


Yes, I realise co2_t6603 does not work with put & get yet.  This is  
only a proposal.


---
ir EE van Andel [EMAIL PROTECTED]  http://www.fiwihex.nl
Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands
tel+31-546-491106 fax+31-546-491107



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to