in reply to Idea on a Base class API
I worry that you're combining the worst aspects of C/C++
(convoluted syntax) and Perl (flexability that gets you into
trouble when you use the wrong option). One of the
cornerstone ideas of Perl is that new tools are optional, and
hence can only add to understanding. It seems like there's
just an awful lot of overhead, involving a lot of syntax, to
get the work done. The API doesn't mesh with Perl's
shallow learning curve.
For example, defining data type values for each attribute painfully reminds me of C data types. I'd rather have an API that did the work for me-- the API isn't serving the programmer if the programmer does all their work in the function arguments. For example, you could figure out most data types via the get() and set() functions. If you want to set an object "strict", the object could warn (or prohibit) when an old reference value was changed to a scalar, for example.
I think you need to plan this from a totally different mindset. Don't start from, "This is what C++ says classes are-- how do I implement that?" Start from, "What's the easiest, cleanest way for the programmer to implement classes, and what API serves that purpose best?"
-Ted
For example, defining data type values for each attribute painfully reminds me of C data types. I'd rather have an API that did the work for me-- the API isn't serving the programmer if the programmer does all their work in the function arguments. For example, you could figure out most data types via the get() and set() functions. If you want to set an object "strict", the object could warn (or prohibit) when an old reference value was changed to a scalar, for example.
I think you need to plan this from a totally different mindset. Don't start from, "This is what C++ says classes are-- how do I implement that?" Start from, "What's the easiest, cleanest way for the programmer to implement classes, and what API serves that purpose best?"
-Ted
|
---|
Replies are listed 'Best First'. | |
---|---|
Object concept ... starting from scratch
by dragonchild (Archbishop) on Jun 14, 2001 at 21:25 UTC | |
by tedv (Pilgrim) on Jun 15, 2001 at 00:16 UTC | |
by dragonchild (Archbishop) on Jun 15, 2001 at 16:17 UTC |
In Section
Meditations