Luke
While they're certainly useful, I think essential's an awfully strong
word there. You'll note that, just off the top of my head, C, BASIC,
Fortran, Perl, Python, Java, Ruby, Pascal, Oberon, Modula (2 and 3),
Forth, Eiffel, Haskell, BLISS, C++, C#, COBOL, PL/I, APL, B, and BCPL
all don't do character properties/attributes.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk
What, you're using emacs as an argument *for* something? :-P
And, FWIW, emacs is written in C. Granted a much macro-mutated
version of C, but C nonetheless.
Q.E.D. :-)
=Austin
--- Dan Sugalski <d...@sidhe.org> wrote:
__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
Just like Perl 5 ;-)
Fair enough. Then tell me how you solve this problem: You have a text
file in a string, that the user has marked several places in. He's
referring to words for which he wants to keep bookmarks in. Now, he
deletes text (using substr), and we want to keep the marks relative to
the words, not their positions. This seems easy, yet there's not
necessarily an easy way to do it. Uh oh, violating perl philosophy :)
Ok, how about this: Is there a reason I<not> to? Or should I not go
there?
Luke
Sounds like a good candidate for modulehood.
> Ok, how about this: Is there a reason I<not> to? Or should I not go
> there?
Off hand, it sounds expensive. I don't see a way to only let the people
who use it incur the penalty, but my vision isn't the best in the world.
-Scott
--
Jonathan Scott Duff
du...@cbi.tamucc.edu
It should be possible to define the bookmark methods on the basic string
class to rebless the object onto a more powerful subclass. This way, there
is no overhead until the extra information is actually attached. (bless, not
copy, because there may be other references to the string).
Dave.
I didn't call the problem unreasonable, I was objecting to its
characterization as an "essential feature". It isn't. A useful thing,
definitely, but there are a lot of those. It's hardly essential any
more than, say, a hash that automagically maps to the current
directory's files (iteratively, of course, catching all the
subdirectories) is essential
While perl is a language that makes it easy to do useful things, it
doesn't mean that all useful things should be easy to do in perl.
Given how large the set of Useful Things is, that's not unreasonable.
That makes it a doubly good candidate for modulehood.
--
It's 106 miles from Birmingham, we've got an eighth of a tank of gas,
half a pack of Dorritos, it's dusk, and we're wearing contacts.
- Malcolm Ray
Almost. At least perl 5's macros look like C. Emacs' macro horrors
make C look like Lisp...
I see what you mean now. I had A Momentary Lapse of Reason, in which
I forgot modules could do such things. It's very suited to a
module---not very common, but very important to certain problems.
Luke