220 28905 <de8050cf-117b-46e6-b2de-329db8d2bfca@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Giovanni Piero Deretta <gpderetta@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: generic dynamic / runtime cast (cast to real
 runtime type)
Date: Sun, 16 Oct 2016 14:04:22 -0700 (PDT)
Lines: 74
Approved: news@gmane.org
Message-ID: <de8050cf-117b-46e6-b2de-329db8d2bfca@isocpp.org>
References: <3d2ec365-84af-40e2-aa01-2807739716f8@isocpp.org>
 <4908423.ESY8U5GBX0@tjmaciei-mobl1>
 <39dc6003-567c-4506-9fbb-2e0340313960@isocpp.org>
 <09d1c64d-9207-4b2b-b134-45cb5cbbdf9e@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1674_596928945.1476651862767"
X-Trace: blaine.gmane.org 1476651881 30530 195.159.176.226 (16 Oct 2016 21:04:41 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 16 Oct 2016 21:04:41 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDEP3I7TGEINRVUPYACRUBDMRDS52@isocpp.org Sun Oct 16 23:04:37 2016
Return-path: <std-proposals+bncBDEP3I7TGEINRVUPYACRUBDMRDS52@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pa0-f72.google.com ([209.85.220.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDEP3I7TGEINRVUPYACRUBDMRDS52@isocpp.org>)
	id 1bvsbX-0005jN-Or
	for gclcip-std-proposals@m.gmane.org; Sun, 16 Oct 2016 23:04:23 +0200
Original-Received: by mail-pa0-f72.google.com with SMTP id hm5sf179275799pac.4
        for <gclcip-std-proposals@m.gmane.org>; Sun, 16 Oct 2016 14:04:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=2Bks1t/EyELKjW/183NTkpxXd4YB3cH3XYK3n6ucn7k=;
        b=DynDPjmJN6LgMa/JNHyCCQjBreNahJiNq0Ciy1Ctaq3oElvDLTdiu8yQuQEH5QvtBP
         Ta6N56W2mhClac82SMJWmTjQnF0rI32gpwrnqh7zY0s/SmCbmQjtHp6LELomZ7MipsVS
         Gp6o5nAjRh9wqTLKyNaQwZaywoYFq+OeuCjEee4TC9u9vc5py1jWDUp4GIUrl1wVsv8z
         buW7uoUe1qRU5qSjtRzVC8GLdU5+2M+KEQwkCdiww51bKSbPVWo/eYB7PIhvvbPzrFe+
         3zAZsWOp8Eguc+Su3VNyOLSlJ+dL8OGXCNTNbW2Xy02GE4uca41+itdXWnxd5joLFHEV
         zAzw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=2Bks1t/EyELKjW/183NTkpxXd4YB3cH3XYK3n6ucn7k=;
        b=eT7AIWZnbBK5NpyG9QnJy+/sfxDUH1LERcUvr3ttl4caEIp6haKZ4lV85R9JHQFAtA
         5tPkWfQHnpnSZt+3PqPg5QsmUNtA8j6Be5z2p6W2wfFIb0abI7uhrYh/Lzsv5IFN7nQ0
         knyOx117sWo8Oh6MRnFGRWlGc6G3FupeyL7GVnbF2uQOdcjwM3iLkKjVdjgsxNnQamC+
         frSVsmkloUQPnbBVj53oQkTu1qPE7fV0zJQqO6VrlgNAw4TOWzEzEh89Q0gDkCScJT3I
         nq2awwDXEx45rirTfFGA4LnIw7qSWd92Sa3mmdHxvMiHCXiaQwwEtXIKMVhnkfAg6IPL
         JcEA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=2Bks1t/EyELKjW/183NTkpxXd4YB3cH3XYK3n6ucn7k=;
        b=Kf+KYT5lCvWODcWXvZdaJGC3OeTwnWmJs2GRJmn4zfVnato1jX0hLzwdXL4mCb+fbq
         e0Ues5NDELkPustsPDDzzmA5byuh9JNIA0Y7rwZBdczd9r1dT5V4viCZutea4FmOokdH
         dqMEmgZAv6NjNOG0/QNA0CyY+3waCge6lHGGVku13hSv/TyJP3HyPLUieKe8ZrxBgNeT
         hwrQZxG0IrljEnt4YimguDHslTQIVK6tzJ/FLVKIvIoJ0mDXrV3etIMVI6eDoZN3fDFz
         IET1JrOWevxOleP2qhOktDA6k8nxmToYB59jT8EbfASzQWR9Qnx0c4XUVY07eUTmqy23
         aYyQ==
X-Gm-Message-State: AA6/9RmTq56qLIYTz6dtDuNrBoPWO6MmW0SSb1eeFxE9rsJxFoPG3pQrKXZHyKlH4bqMdQ==
X-Received: by 10.66.124.195 with SMTP id mk3mr5106018pab.42.1476651865519;
        Sun, 16 Oct 2016 14:04:25 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.19.200 with SMTP id 69ls3955649iot.4.gmail; Sun, 16 Oct
 2016 14:04:23 -0700 (PDT)
X-Received: by 10.36.77.75 with SMTP id l72mr245899itb.1.1476651863851;
        Sun, 16 Oct 2016 14:04:23 -0700 (PDT)
In-Reply-To: <09d1c64d-9207-4b2b-b134-45cb5cbbdf9e@isocpp.org>
X-Original-Sender: gpderetta@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:28905
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28905>

------=_Part_1674_596928945.1476651862767
Content-Type: multipart/alternative; 
	boundary="----=_Part_1675_843545225.1476651862767"

------=_Part_1675_843545225.1476651862767
Content-Type: text/plain; charset=UTF-8

On Sunday, October 16, 2016 at 7:03:14 PM UTC+1, Nicol Bolas wrote:
[...] 

> C++ is a statically typed language. What you're talking about requires 
> dynamic dispatching of a kind that C++ as a language is simply not capable 
> of. Not without adding a bunch of hacks to the language.
>
>
C++ has dynamic dispatching, but it is restricted only on the first 
parameter of virtual function calls. There was a paper sometimes ago 
Stroustrup about a possible efficient implementation of multiple dispatch 
for C++ [1], but there isn't really enough support to get it into the 
language. 

C# dynamic is a great feature, but to perform decently needs a powerful 
runtime/JIT. I do not think it would work well in C++. Multimethods would 
be nice though.

[1]  Open Multimethods in C++.

-- gpd

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/de8050cf-117b-46e6-b2de-329db8d2bfca%40isocpp.org.

------=_Part_1675_843545225.1476651862767
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Sunday, October 16, 2016 at 7:03:14 PM UTC+1, Nicol Bol=
as wrote:<div>[...] <br></div><blockquote class=3D"gmail_quote" style=3D"ma=
rgin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">=
<div dir=3D"ltr">C++ is a statically typed language. What you&#39;re talkin=
g about requires dynamic dispatching of a kind that C++ as a language is si=
mply not capable of. Not without adding a bunch of hacks to the language.<b=
r><div><br></div></div></blockquote><div><br>C++ has dynamic dispatching, b=
ut it is restricted only on the first parameter of virtual function calls. =
There was a paper sometimes ago Stroustrup about a possible efficient imple=
mentation of multiple dispatch for C++ [1], but there isn&#39;t really enou=
gh support to get it into the language. <br><br>C# dynamic is a great featu=
re, but to perform decently needs a powerful runtime/JIT. I do not think it=
 would work well in C++. Multimethods would be nice though.<br><br>[1]=C2=
=A0 Open Multimethods in C++.<br><br>-- gpd<br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/de8050cf-117b-46e6-b2de-329db8d2bfca%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/de8050cf-117b-46e6-b2de-329db8d2bfca=
%40isocpp.org</a>.<br />

------=_Part_1675_843545225.1476651862767--

------=_Part_1674_596928945.1476651862767--

.
