is OO any use?
David McNab <[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.gnupic |
|---|---|
| Message-ID | <[email protected]> |
Hi, This is not a troll, so please forgive me if it comes across as such. I'm writing because I'm in the process of forking pic18forth (which generates sluggish but ultra-compact code) to a forth that generates pure machine code (way faster, but nowhere near as compact). This fork is producing a forth that is very 'vanilla' and architecture-neutral, with the possibility af implementing the same language, API, runtime environment etc for other PICs, and even other ucontrollers such as the various AVR lines. Also, this forth will be very usable as a backend for other language compilers, such as python (subset), C, Java subset. What I'm asking here is - is there any real practical value to be gained from supporting OOP in a PIC runtime environment? I successfully implemented a reasonably efficient OO layer that supports most of the OO basics like inheritance, polymorphism and dynamic allocation (but no gc or refcounting), as well as early and late binding. Some possible applications for OO on PIC might include: - controlling multiple analog inputs - multiple serial ports, using the USART plus bit-bashed serial I/O on other port pins - multiple LCD display modules - if interacting with multiple other PICs (eg, via serial multidrop), could represent those other PICs as objects Your thoughts? Is OO on PIC a useless wank, or can it have real practical value? -- Cheers David