Thread overview | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
March 13, 2008 Invariant strings on Dr. Dobb's | ||||
---|---|---|---|---|
| ||||
Dr. Dobb's has invited me to write a blog for them, so here's my first installment on invariant strings: http://www.dobbscodetalk.com/index.php?option=com_myblog&show=Invariant-Strings.html&Itemid=29 |
March 13, 2008 Re: Invariant strings on Dr. Dobb's | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Reply to Walter,
> Dr. Dobb's has invited me to write a blog for them, so here's my first
> installment on invariant strings:
>
> http://www.dobbscodetalk.com/index.php?option=com_myblog&show=Invarian
> t-Strings.html&Itemid=29
>
wow, a publicly available picture of Walter!
And on the content; you mention concatenation as working on invariant strings. I assume this is because you generally can't concatenate in place anyway?
|
March 13, 2008 Re: Invariant strings on Dr. Dobb's | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | BCS wrote:
> And on the content; you mention concatenation as working on invariant strings. I assume this is because you generally can't concatenate in place anyway?
I'm not sure what you mean.
|
March 13, 2008 Re: Invariant strings on Dr. Dobb's | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | BCS wrote: > Reply to Walter, > >> Dr. Dobb's has invited me to write a blog for them, so here's my first >> installment on invariant strings: >> >> http://www.dobbscodetalk.com/index.php?option=com_myblog&show=Invarian >> t-Strings.html&Itemid=29 >> > > wow, a publicly available picture of Walter! You can actually see him move, and talk, too, if you go here! http://video.google.com/videoplay?docid=-7073020265668105471 :-) |
March 14, 2008 Re: Invariant strings on Dr. Dobb's | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter wrote:
> You can actually see him move, and talk, too, if you go here!
> http://video.google.com/videoplay?docid=-7073020265668105471
That's just a very clever animation. Those google fellows are good!
|
March 14, 2008 Re: Invariant strings on Dr. Dobb's | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Thu, 13 Mar 2008 14:25:00 -0700, Walter Bright wrote:
> Dr. Dobb's has invited me to write a blog for them, so here's my first installment on invariant strings:
>
> http://www.dobbscodetalk.com/index.php?option=com_myblog&show=Invariant-
Strings.html&Itemid=29
There is a poll in the right corner:
"What programming language do you PREFER to work in?"
Would be nice if they would have a "D" option.
|
March 14, 2008 Re: Invariant strings on Dr. Dobb's | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Reply to Walter,
> BCS wrote:
>
>> And on the content; you mention concatenation as working on invariant
>> strings. I assume this is because you generally can't concatenate in
>> place anyway?
>>
> I'm not sure what you mean.
>
You say that the common ops generally don't mutate the data and then list "moving references around, slicing, and concatenating". I guess my thought is that the first two are a bit more self explanatory than the last. Clearly 1 & 2 are non mutating but, a guy who is a few Lattes behind might not notice that because you, in general, don't known what comes after a string, if you want to extend a string (for concatenating), you need to allocate new ram for it, thus leaving the first blocks untouched. (I'm not thinking specific to D here).
|
March 14, 2008 Re: Invariant strings on Dr. Dobb's | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Reply to Bill,
> BCS wrote:
>
>> Reply to Walter,
>>
>>> Dr. Dobb's has invited me to write a blog for them, so here's my
>>> first installment on invariant strings:
>>>
>>> http://www.dobbscodetalk.com/index.php?option=com_myblog&show=Invari
>>> an t-Strings.html&Itemid=29
>>>
>> wow, a publicly available picture of Walter!
>>
> You can actually see him move, and talk, too, if you go here!
> http://video.google.com/videoplay?docid=-7073020265668105471
> :-)
>
I think the thumbnail pix on the /blog/ has better resolution!
|
March 14, 2008 Re: Invariant strings on Dr. Dobb's | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | BCS wrote:
> You say that the common ops generally don't mutate the data and then list "moving references around, slicing, and concatenating". I guess my thought is that the first two are a bit more self explanatory than the last. Clearly 1 & 2 are non mutating but, a guy who is a few Lattes behind might not notice that because you, in general, don't known what comes after a string, if you want to extend a string (for concatenating), you need to allocate new ram for it, thus leaving the first blocks untouched. (I'm not thinking specific to D here).
All I meant was that a common operation is concatenating - an operation that in C is usually done by allocating a mutable buffer, then copying the strings into it.
|
March 14, 2008 Re: Invariant strings on Dr. Dobb's | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Dr. Dobb's has invited me to write a blog for them, so here's my first installment on invariant strings:
>
> http://www.dobbscodetalk.com/index.php?option=com_myblog&show=Invariant-Strings.html&Itemid=29
>
Weird. Somebody edited the comments I posted. They basically did the edits I wanted to make but couldn't, but it still leaves me with a creepy feeling.
--bb
|
Copyright © 1999-2021 by the D Language Foundation