Subject:
|
Re: OO programing in RCX
|
Newsgroups:
|
lugnet.robotics.rcx
|
Date:
|
Wed, 12 Jan 2000 02:25:59 GMT
|
Viewed:
|
1588 times
|
| |
| |
I should probably mention again that legOS supports C++, and supports it
even better if you add void*builtin_new(size_t n){return malloc(n)}; to
the appropriate library, as v0.3.0 will. The rest of this is off-topic.
Dave Baum schrieb:
> Ironically, the NQC compiler itself is very OO.
Interesting. Most compilers aren't - which is very bad for maintenance
if they're written by hand. But then, there are generators for almost
every stage of a compiler now.
I was wondering, did you use generators in writing nqc? What kind of
intermediate representation are you using? Code-generator templates are
probably tricky, considering the bytecodes...
On a different note, we recently made a comparison of several
implementations of standard compiler data structures, e.g., symbol and
definition tables, syntax trees etc. Plain old C came out two times as
fast as standard C++, and over three times as fast as STL code. Of
cause, this only amounts to anything if you're planning on compiling
several thousands of lines of code ;-)
G'Night,
Markus.
|
|
Message has 1 Reply: | | Re: OO programing in RCX
|
| (...) OO works very well for things like a parse tree. I can add a new statement and just add its rules for semantic checking and code generation...all within its own class. I think part of the problem is that compiler design is a very heavily (...) (25 years ago, 12-Jan-00, to lugnet.robotics.rcx)
|
Message is in Reply To:
| | Re: OO programing in RCX
|
| (...) I toyed with a couple of ideas for this, but most of the really useful things can't be done using the standard bytecodes. About the only thing I came up with was a way to wrap the standard API calls up into some classes. However, implementing (...) (25 years ago, 11-Jan-00, to lugnet.robotics.rcx)
|
14 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|