Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/09/06 15:53
Modified:
  10/09/06 16:04

Read: times


 
Msg Score: +1
 +1 Informative
#126058 - Maybe abstraction is not the issue
Responding to: ???'s previous message
Erik said:
Most so called abstraction I have seen has been for the sake of obfusciation.

Would you give an example of one of the cases you have seen of abstraction used for the sake of obfuscation? I'm not sure what you mean by that.

Erik said:
If you use "abstraction" as the OP suggest, to be able to do something you do not understand, that is not useful "abstraction" but guarateeing failure.

Not really. For example, I may not know how to calculate square roots using only the simple arithmetic operations provided by my CPU. But I do know how to call the sqrt() function provided by the standard C library. This is a perfect example where an abstraction (the sqrt() function) allows me to do something (calculating the square root) that I don't understand. Far from "guaranteeing failure", it allows me to get my work done without having to reinvent the wheel at every step. I would be much more likely to fail without the abstraction.

I'm starting to guess that you're not really challenging the idea of abstraction itself, but maybe something that you don't like about the Attila's idea of an 8051 API in particular. Is that a good guess? If so, it might be helpful for you to explain your specific objection to what the OP is trying to do.

I think it would be very difficult to make an 8051 API that was flexible enough and universal enough (i.e., "applicable to enough 8051 variants") to be useful, but I don't think the concept itself is flawed. I mean, suppose somebody actually did it, and it was really possible to write something like the following and just know that it would work:
 
#define VARIANT SILABS_C8051F120
#include "8051api.h"

void main() {
    InitializeUART0(BAUD_9600);
    StringToUART0("Hello, Attila");
}
 
Wouldn't that be a liberating change from the endless farting around with SFRs that we do now?

-- Russ


List of 32 messages in thread
TopicAuthorDate
Uncalled segments problem with library            01/01/70 00:00      
   Work with the tools!            01/01/70 00:00      
      I didn't know that is the standard way...            01/01/70 00:00      
         Not a 'C' language issue.            01/01/70 00:00      
         Not True            01/01/70 00:00      
   abstraction my butt            01/01/70 00:00      
      Abstraction HAS a meaning in embedded            01/01/70 00:00      
         yes sure            01/01/70 00:00      
         so why do you do these things            01/01/70 00:00      
            Maybe I don't know what abstraction is...            01/01/70 00:00      
               Hardware knowledge            01/01/70 00:00      
      Abstraction: NOT Always Bad            01/01/70 00:00      
         10 points Russ            01/01/70 00:00      
            shades of grey            01/01/70 00:00      
               Maybe abstraction is not the issue            01/01/70 00:00      
                  Useful?            01/01/70 00:00      
                     Pascal            01/01/70 00:00      
                     etc, etc            01/01/70 00:00      
                  is a libray function an "abstraction"?            01/01/70 00:00      
                     Is a library function an abstraction?            01/01/70 00:00      
                  I rest my case, m'lud            01/01/70 00:00      
                     Attila! Where are you?            01/01/70 00:00      
                  CodeArchitect?            01/01/70 00:00      
                     CodeArchitect?            01/01/70 00:00      
                     it generates source code; however            01/01/70 00:00      
         about abstraction ...            01/01/70 00:00      
            By Jove, I think you've got it!            01/01/70 00:00      
         Some more info why I wan't to use an API            01/01/70 00:00      
            a TOTALLY different story            01/01/70 00:00      
               Provide the source code...            01/01/70 00:00      
            Some more info why I wan't to use an hard disk            01/01/70 00:00      
               two mistakes            01/01/70 00:00      

Back to Subject List