Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Life, loathe it or ignore it, you can't like it." -- Marvin the paranoid android


devel / comp.lang.c++ / Re: What is visitor pattern?

SubjectAuthor
* What is visitor pattern?wij
+* Re: What is visitor pattern?Öö Tiib
|+- Re: What is visitor pattern?wij
|`* Re: What is visitor pattern?wij
| `* Re: What is visitor pattern?Öö Tiib
|  `- Re: What is visitor pattern?wij
+* Re: What is visitor pattern?Pavel
|+* Re: What is visitor pattern?Öö Tiib
||`* Re: What is visitor pattern?Pavel
|| `* Re: What is visitor pattern?Öö Tiib
||  +* Re: What is visitor pattern?Muttley
||  |`* Re: What is visitor pattern?Öö Tiib
||  | `* Re: What is visitor pattern?Tim Rentsch
||  |  `* Re: What is visitor pattern?Öö Tiib
||  |   `- Re: What is visitor pattern?Tim Rentsch
||  `* Re: What is visitor pattern?Pavel
||   `* Re: What is visitor pattern?Öö Tiib
||    `* Re: What is visitor pattern?Pavel
||     `* Re: What is visitor pattern?Öö Tiib
||      `* Re: What is visitor pattern?Pavel
||       `* Re: What is visitor pattern?Öö Tiib
||        `- Re: What is visitor pattern?Pavel
|`* Re: What is visitor pattern?Bonita Montero
| `* Re: What is visitor pattern?Pavel
|  `* Re: What is visitor pattern?Bonita Montero
|   `* Re: What is visitor pattern?Pavel
|    `* Re: What is visitor pattern?Bonita Montero
|     `* Re: What is visitor pattern?Pavel
|      `* Re: What is visitor pattern?Bonita Montero
|       `* Re: What is visitor pattern?Pavel
|        `* Re: What is visitor pattern?Bonita Montero
|         `* Re: What is visitor pattern?Pavel
|          `* Re: What is visitor pattern?Bonita Montero
|           +* Re: What is visitor pattern?Muttley
|           |`* Re: What is visitor pattern?Bonita Montero
|           | `* Re: What is visitor pattern?Muttley
|           |  +* Re: What is visitor pattern?Bonita Montero
|           |  |`* Re: What is visitor pattern?Muttley
|           |  | +* Re: What is visitor pattern?Bonita Montero
|           |  | |`* Re: What is visitor pattern?Muttley
|           |  | | `- Re: What is visitor pattern?Bonita Montero
|           |  | `- Re: What is visitor pattern?Bonita Montero
|           |  `- Re: What is visitor pattern?Pavel
|           `* Re: What is visitor pattern?Pavel
|            `* Re: What is visitor pattern?Bonita Montero
|             `- Re: What is visitor pattern?Pavel
+* Re: What is visitor pattern?Alf P. Steinbach
|`- Re: What is visitor pattern?Alf P. Steinbach
+* Re: What is visitor pattern?Michael S
|+- Re: What is visitor pattern?Bonita Montero
|+- Re: What is visitor pattern?Öö Tiib
|`- Re: What is visitor pattern?Pavel
`- Re: What is visitor pattern?Bonita Montero

Pages:123
Re: What is visitor pattern?

<WBxHM.964727$GMN3.213848@fx16.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1228&group=comp.lang.c%2B%2B#1228

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx16.iad.POSTED!not-for-mail
Subject: Re: What is visitor pattern?
Newsgroups: comp.lang.c++
References: <331cb164-e6b3-4f9b-af8d-ee933abd79b7n@googlegroups.com>
<uIsEM.123835$QQFb.6082@fx38.iad> <ubuoig$1ons4$1@dont-email.me>
<AXVEM.568386$SuUf.28925@fx14.iad> <uc1b4g$292ev$1@dont-email.me>
<LzWEM.65654$VPEa.6307@fx33.iad> <uc29p5$2dgb7$1@dont-email.me>
<niCFM.897824$GMN3.379171@fx16.iad> <uc703b$3cer6$1@dont-email.me>
<gcSFM.312013$Fgta.22420@fx10.iad> <uc9696$3rp9i$1@dont-email.me>
<2KfGM.827216$TPw2.761320@fx17.iad> <ucc9bg$g167$1@dont-email.me>
From: pauldont...@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17
MIME-Version: 1.0
In-Reply-To: <ucc9bg$g167$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 45
Message-ID: <WBxHM.964727$GMN3.213848@fx16.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Wed, 30 Aug 2023 02:14:14 UTC
Date: Tue, 29 Aug 2023 22:14:14 -0400
X-Received-Bytes: 3250
 by: Pavel - Wed, 30 Aug 2023 02:14 UTC

Bonita Montero wrote:
> Am 26.08.2023 um 07:05 schrieb Pavel:
>
>> Visitor does not need anything, it simply solves a particular class
>> of  problems that happens to include a structure of objects of
>> multiple types. Your visitor implementation is invalid if it cannot
>> solve a valid visitor problem.
>
> Either I didn't describe the difference to what you imagine correctly
> or you just didn't understand me.
None of the above it is just you are not trying to read.

> In the Visitor pattern, the Visitor
> needs a base class with a virtual method to derive from, and the derived
> object is passed by reference to the Visitor function of the objects
> being visited.
No. Visitor needs no types. The **problems that Visitor solves** include
data structures of multiple types. The applicability of Visitor is
exactly when the programmer is limited to small backward-compatible
changes to the type hierarchy **given in the problem, not "needed by
Visitor"**, ideally, no changes at all.

Try to read what's written, not what you want to see.

I will try one more time, in negative terms, in case it makes it easier
for you to comprehend:

No type hierarchy in the problem -- no need in Visitor in the solution.

Now, "a base class with a virtual method to derive from" are just
possible implementation details for the type hierarchy, so not 100%
needed. The type hierarchy could be a variant or another type hierarchy
where the dynamic type is detectable at run-time. There must be,
however, a comprehensive type hierarchy for the Visitor to be useful.

What you are trying to demonstrate, on the other hand, is called a
"higher-order function" in functional programming. And, no, it does not
need a new name because it already has an industry-standard name.

> However, the derived and the base class are superfluous
> with functional programming. Since C++11 you can simply request a
> function<> object and conveniently you just pass a lambda that when
> called, a temporary function<> object is created that represents the
> interface to the object that can be visited.

Re: What is visitor pattern?

<ucmfll$2k424$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1229&group=comp.lang.c%2B%2B#1229

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: What is visitor pattern?
Date: Wed, 30 Aug 2023 06:13:41 +0200
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <ucmfll$2k424$1@dont-email.me>
References: <331cb164-e6b3-4f9b-af8d-ee933abd79b7n@googlegroups.com>
<uIsEM.123835$QQFb.6082@fx38.iad> <ubuoig$1ons4$1@dont-email.me>
<AXVEM.568386$SuUf.28925@fx14.iad> <uc1b4g$292ev$1@dont-email.me>
<LzWEM.65654$VPEa.6307@fx33.iad> <uc29p5$2dgb7$1@dont-email.me>
<niCFM.897824$GMN3.379171@fx16.iad> <uc703b$3cer6$1@dont-email.me>
<gcSFM.312013$Fgta.22420@fx10.iad> <uc9696$3rp9i$1@dont-email.me>
<2KfGM.827216$TPw2.761320@fx17.iad> <ucc9bg$g167$1@dont-email.me>
<WBxHM.964727$GMN3.213848@fx16.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 30 Aug 2023 04:13:41 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1516dabee8f133ed8fc4a778f5a0be1a";
logging-data="2756676"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+GvwSuQIKzrte0zHcS1z7O6P7T4fwowWw="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:fT3XqkGA54JT8fgaKutA7lNfXK4=
In-Reply-To: <WBxHM.964727$GMN3.213848@fx16.iad>
Content-Language: de-DE
 by: Bonita Montero - Wed, 30 Aug 2023 04:13 UTC

Am 30.08.2023 um 04:14 schrieb Pavel:

> No. Visitor needs no types. The **problems that Visitor solves** include
> data structures of multiple types. The applicability of Visitor is
> exactly when the programmer is limited to small backward-compatible
> changes to the type hierarchy **given in the problem, not "needed by
> Visitor"**, ideally, no changes at all.

You simply don't understand what I wrote.

Re: What is visitor pattern?

<LDTHM.472104$xMqa.73253@fx12.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1236&group=comp.lang.c%2B%2B#1236

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx12.iad.POSTED!not-for-mail
Subject: Re: What is visitor pattern?
Newsgroups: comp.lang.c++
References: <331cb164-e6b3-4f9b-af8d-ee933abd79b7n@googlegroups.com>
<uIsEM.123835$QQFb.6082@fx38.iad> <ubuoig$1ons4$1@dont-email.me>
<AXVEM.568386$SuUf.28925@fx14.iad> <uc1b4g$292ev$1@dont-email.me>
<LzWEM.65654$VPEa.6307@fx33.iad> <uc29p5$2dgb7$1@dont-email.me>
<niCFM.897824$GMN3.379171@fx16.iad> <uc703b$3cer6$1@dont-email.me>
<gcSFM.312013$Fgta.22420@fx10.iad> <uc9696$3rp9i$1@dont-email.me>
<2KfGM.827216$TPw2.761320@fx17.iad> <ucc9bg$g167$1@dont-email.me>
<WBxHM.964727$GMN3.213848@fx16.iad> <ucmfll$2k424$1@dont-email.me>
From: pauldont...@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17
MIME-Version: 1.0
In-Reply-To: <ucmfll$2k424$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 12
Message-ID: <LDTHM.472104$xMqa.73253@fx12.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Thu, 31 Aug 2023 03:18:03 UTC
Date: Wed, 30 Aug 2023 23:18:03 -0400
X-Received-Bytes: 1665
 by: Pavel - Thu, 31 Aug 2023 03:18 UTC

Bonita Montero wrote:
> Am 30.08.2023 um 04:14 schrieb Pavel:
>
>> No. Visitor needs no types. The **problems that Visitor solves**
>> include data structures of multiple types. The applicability of
>> Visitor is exactly when the programmer is limited to small
>> backward-compatible changes to the type hierarchy **given in the
>> problem, not "needed by Visitor"**, ideally, no changes at all.
>
> You simply don't understand what I wrote.
>
Of course if you say so.


devel / comp.lang.c++ / Re: What is visitor pattern?

Pages:123
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor