David A. Black wrote:
Hi –
Why not just use empty modules for all this type-checking? This
isn’t
Because class/module ancestry doesn’t tell you about type. See the
previous 120 messages or so
Ehh, I swore I’d stay out of this. But here I am.
Yeah, maybe I should have stayed out of it too.
I think what Wesley is talking about is different. He’s proposing (or
not really proposing, since he’s only asking “Why don’t the people
who want this do that?”) – as I understand it – creating modules
whose sole purpose is to identify the high-level properties of an
object.
That’s right, Hal; I read through the previous 120 messages or so, and
thought “I really don’t want that, but for the people who do, and say
they want features x, y, and z, why don’t they just do this?”.
Bah, well, let’s just pretend I didn’t say anything.
And someone will say, “Yes, but I could mix in that module even if
the object didn’t have those properties.”
And someone else will say, “Yes, but that would be a BUG.”
And the never-ending thread goes on.
(Completely off-topic, but more interesting to me):
Sometime I’ll have to post about my C++ preprocessor that lets you embed
ruby in C++. Unlike other implementations I’ve seen, it’s two-way –
you can put variables in, and get them back out.
#include <stdio.h>
#include
#include
using std::string;
using std::cout;
#include <inline_ruby.h>
int main() {
int x = 9;
int y = 12;
string s = “fooxar”;
printf(“My favorite words are %s.\n”,
inline_ruby { %{s}.sub(‘x’,‘b’) + " and " + “bar” });
int z = inline_ruby { %{x} + %{y} };
inline_ruby { %{s} = “Hello, World!\n” }
cout << s;
Ruby::Value v = inline_ruby { Object.new }
inline_ruby { p %{v} }
}
Ah, I need to package that up for release, it’s lots of fun. =)
“The thread goes ever, ever on,
Down from the post where it began…”
“This is the thread that never ends! …
Yes it goes on and on my friends! …”
···
On Wednesday 19 November 2003 10:33 pm, Hal Fulton wrote:
On Thu, 20 Nov 2003, Wesley J Landaker wrote:
–
Wesley J. Landaker - wjl@icecavern.net
OpenPGP FP: 4135 2A3B 4726 ACC5 9094 0097 F0A9 8A4C 4CD6 E3D2