[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zeromq-dev
Subject:    Re: [zeromq-dev] Porting libzmq to C++11
From:       "Jens Auer" <jens.auer () betaversion ! net>
Date:       2017-05-22 18:52:35
Message-ID: 00bb01d2d32c$96133a70$c239af50$ () betaversion ! net
[Download RAW message or body]

This is a multipart message in MIME format.

[Attachment #2 (multipart/alternative)]
This is a multipart message in MIME format.


Hi,

 

I've read the post a couple of years ago. You probably find some comments from  me in \
the comments section. I still think that the conclusion is questionable for a couple \
of reasons. The first post is about C++ exceptions, but it is more a criticism of \
some common bad usage of exceptions. Conditions which you expect and have to handle \
are not exceptional, and thus should not be handled by exceptions. Exceptions are for \
errors which you cannot handle locally and have to let the caller (or somewhere up \
the call hierarchy) handle. Together with RAII, this creates a very clean programing \
style.

 

The main point in the second post is that C++ forces you to write inefficient code \
and then he compares an linked list written in C to std::list. IMHO, this is \
comparing apples and oranges. First, the C list is an intrusive list and std::list is \
not. This is not a language decision, but a design choice for the list \
implementation. In the example, he shows a Person struct which has next and prev \
pointers to form a list. From software engineering point of view, and the language is \
irrelevant, this combines two independent concerns which should be expressed \
independently, e.g. in a list implementation and a Person struct. Sometimes, \
performance dictates using intrusive lists, but even this can be done in C++ in a \
better way using mix-ins. At least, we can write a list implementation which can be \
used with anything providing a prev- and next field in a type-safe and efficient way.

 

There is also a hidden argument for C++11 in the post. The example was changed to \
make Person non-assignable to prevent using a STL list in an easy way. In C++11 we \
can use movable objects and still have an efficient std::list implementation where \
the stored nodes are equivalent to the C struct Person, but we keep the concerns \
separated. I would say this a clear win for C++11.

 

That being said, I think Martin knows way more about network programming (and \
messaging, distributed systems …) than I will ever learn. I just think that modern \
C++ is not his biggest strength.

 

Cheers,

Jens

 

Von: zeromq-dev [mailto:zeromq-dev-bounces@lists.zeromq.org] Im Auftrag von \
                lists@chuckremes.com
Gesendet: Freitag, 19. Mai 2017 15:29
An: ZeroMQ development list
Betreff: Re: [zeromq-dev] Porting libzmq to C++11

 

Looks like no one has read the blog posts I sent earlier in this thread. The original \
author of libzmq explains his rationale for avoiding C++ very well in these two \
posts. Please read them.

 


http://250bpm.com/blog:4

http://250bpm.com/blog:8

 

Additionally, if you want to consider how to REWRITE libzmq, then look at how the \
original author of libzmq approached it.

 

http://nanonmsg.org

 

He rewrote it in C and named it something else. It isn't compatible with libzmq's \
wire protocol but it should give some ideas on how to adjust the architecture. Look \
at the code for it.

 

 





On May 19, 2017, at 8:21 AM, BJovke . <bjovan@gmail.com> wrote:

 

I have a feeling that C++14 and C++17 are just improvements of C++11.

C++11 is the game changer, 14 and 17 don't bring ground breaking stuff.

 

I would be also happy to contribute to C++11 libzmq but I'm not sure how much stuff I \
can do.

I'm currently not familiar with inner workings of libzmq enough detailed to be \
confident to rewrite it, although I'm reading the docs and code day by day.

My time to spend is questionable, sometimes I have a lot of time and sometimes I \
cannot contribute for days or even weeks.

 

There are also many aspects of libzmq which make it hard to adopt the code, instead \
requiring complete rewrite:

 

 

 

 

2017-05-18 20:29 GMT+02:00 Jens Auer <jens.auer@betaversion.net>:

Hi,

I would be happy to contribute to such a project, even if many users will stay with \
the "old" code. For me, it is a great way to learn something. I would also be happy \
to aim for C++14 or even C++17 once it is officially released. I think structured \
bindings and the new if (init; condition)  will be very helpful. C++17 also has \
std::optional.

Cheers,
Jens

-----Ursprüngliche Nachricht-----
Von: zeromq-dev [mailto:zeromq-dev-bounces@lists.zeromq.org] Im Auftrag von Aram \
                Santogidis
Gesendet: Donnerstag, 18. Mai 2017 10:57
An: ZeroMQ development list
Betreff: Re: [zeromq-dev] Porting libzmq to C++11


Hi,

a good reason to modernize the codebase, or even better to create a new project ala \
libzmq11, is to help its evolution with new networking technologies and software \
engineering practices.

As an example, consider the difficulties many faced (including myself) in extending \
ZeroMQ to support RDMA-based networking interfaces. The current design and \
implementation is hostile to such extensions. Honestly, C++98 or not, I think it \
still can be done but with major cost in development effort and additional complexity \
to an already complex codebase.

Moving to C++11 and beyond is not merely an argument of fashion, as some of you \
implied, but it is vital for its future. C++ and related technologies evolve and \
libzmq stays behind. New developers are reluctant to contribute once they have a look \
at the current design and implementation (old school C++ roughly speaking).

Think for example when networking will be included in the standard, how much ugly \
code that juggles platform differences could be eliminated from the current \
implementation. Same applies for threading, which is in the standard since C++11.

I don't underestimate the importance (and the size?) of the current userbase. I'm \
aware from first-hand experience about some fairly critical software that relies on \
libzmq.

I guess the idea is to create i) a new project in the ZeroMQ organization that ii) \
implements ZMTP and iii) the non-depricated ZMQ socket types. The public API of \
libzmq should be a subset of the libzmq11 so that will facilitate the transition of \
users, in the long term, that do not run on legacy systems.

I will happily contribute to such an effort provided that there will be at least one \
or two experienced members from the community that will join this effort.

Cheers,
Aram





On 17.05.2017 16:54, BJovke . wrote:
> Well, you're right. There must be a good reason for such an undertaking.
> I too feel that C++11 itself is not good enough reason.
> Anyway there has to be enough people willing to contribute to it.
> 
> I was just saying this because no idea should be discarded right away,
> but for sure there needs to be a valid need and reason for it.
> 
> Greetings.
> 
> 2017-05-17 16:15 GMT+02:00 Doron Somech <somdoron@gmail.com
> <mailto:somdoron@gmail.com>>:
> 
> What will be the benefit from moving to C++11? And more important
> what is the benefit from having two projects? one supporting C++11
> and one not?
> 
> I think that maintaining two repositories is hard and not sure for
> what cause?
> 
> Anyway, if some one want to do it, in the zeromq philosophy, please
> fork and add the project to the zeromq organization.
> 
> On Wed, May 17, 2017 at 4:29 PM, <lists@chuckremes.com
> <mailto:lists@chuckremes.com>> wrote:
> 
> 
> > On May 17, 2017, at 7:56 AM, BJovke . <bjovan@gmail.com \
> > <mailto:bjovan@gmail.com>> wrote: 
> > Hello.
> > 
> > Libzmq is not even fully C++ compliant:
> > - There's no exception handling.
> > - There are no RAII principles implemented.
> > - Parent/child object hierarchy is loose or not implemented, all of the burden of \
> > proper order of calls is on programmer. 
> > And so on...
> > 
> > C++11 is really a remarkable feat of engineering and me personally like to see \
> > fully C++11 implemented software. Unfortunately, for libzmq this would require \
> > substantial rewrite of the library. 
> > Maybe there's an option to create another parallel branch to existing libzmq or \
> > even create another product, for example "libzmq11"? On the wire this could be \
> > 100% compatible with non-C++11 libzmq but there would be 0% chance to compile \
> > older projects with it.
> 
> This is a good time to bring out some old blog posts. Martin
> Sustrik was the original developer of libzmq. He had some
> thoughts on why he should have written the library in C instead
> of C++. Here you go:
> 
> http://250bpm.com/blog:4
> 
> http://250bpm.com/blog:8
> 
> 
> 
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org <mailto:zeromq-dev@lists.zeromq.org>
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
> <https://lists.zeromq.org/mailman/listinfo/zeromq-dev>
> 
> 
> 
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org <mailto:zeromq-dev@lists.zeromq.org>
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
> <https://lists.zeromq.org/mailman/listinfo/zeromq-dev>
> 
> 
> 
> 
> --
> 
> Jovan Bunjevački.
> 
> 
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
> 
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev





 

-- 

 

Jovan Bunjevački.

_______________________________________________
zeromq-dev mailing list
 <mailto:zeromq-dev@lists.zeromq.org> zeromq-dev@lists.zeromq.org
 <https://lists.zeromq.org/mailman/listinfo/zeromq-dev> \
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

 


[Attachment #5 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type \
content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 \
(filtered medium)"><style><!-- /* Font Definitions */
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-priority:99;
	mso-style-link:"Sprechblasentext Zchn";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:8.0pt;
	font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:36.0pt;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
span.E-MailFormatvorlage17
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
span.SprechblasentextZchn
	{mso-style-name:"Sprechblasentext Zchn";
	mso-style-priority:99;
	mso-style-link:Sprechblasentext;
	font-family:"Tahoma","sans-serif";}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
	{page:WordSection1;}
/* List Definitions */
@list l0
	{mso-list-id:632373650;
	mso-list-type:hybrid;
	mso-list-template-ids:1706060910 -541579108 67567619 67567621 67567617 67567619 \
67567621 67567617 67567619 67567621;} @list l0:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:-;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Calibri","sans-serif";
	mso-fareast-font-family:Calibri;
	mso-bidi-font-family:"Times New Roman";}
@list l0:level2
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Courier New";}
@list l0:level3
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l0:level4
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l0:level5
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Courier New";}
@list l0:level6
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l0:level7
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l0:level8
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Courier New";}
@list l0:level9
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div \
class=WordSection1><p class=MsoNormal><span lang=EN-US \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi,<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I've read \
the post a couple of years ago. You probably find some comments from   me in the \
comments section. I still think that the conclusion is questionable for a couple of \
reasons. The first post is about C++ exceptions, but it is more a criticism of some \
common bad usage of exceptions. Conditions which you expect and have to handle are \
not exceptional, and thus should not be handled by exceptions. Exceptions are for \
errors which you cannot handle locally and have to let the caller (or somewhere up \
the call hierarchy) handle. Together with RAII, this creates a very clean programing \
style.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The main \
point in the second post is that C++ forces you to write inefficient code and then he \
compares an linked list written in C to std::list. IMHO, this is comparing apples and \
oranges. First, the C list is an intrusive list and std::list is not. This is not a \
language decision, but a design choice for the list implementation. In the example, \
he shows a Person struct which has next and prev pointers to form a list. From \
software engineering point of view, and the language is irrelevant, this combines two \
independent concerns which should be expressed independently, e.g. in a list \
implementation and a Person struct. Sometimes, performance dictates using intrusive \
lists, but even this can be done in C++ in a better way using mix-ins. At least, we \
can write a list implementation which can be used with anything providing a prev- and \
next field in a type-safe and efficient way.<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>There is \
also a hidden argument for C++11 in the post. The example was changed to make Person \
non-assignable to prevent using a STL list in an easy way. In C++11 we can use \
movable objects and still have an efficient std::list implementation where the stored \
nodes are equivalent to the C struct Person, but we keep the concerns separated. I \
would say this a clear win for C++11.<o:p></o:p></span></p><p class=MsoNormal><span \
lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>That being \
said, I think Martin knows way more about network programming (and messaging, \
distributed systems …) than I will ever learn. I just think that modern C++ is not \
his biggest strength.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Cheers,<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Jens<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div \
style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p \
class=MsoNormal><b><span lang=EN-US \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span></b><span \
lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> zeromq-dev \
[mailto:zeromq-dev-bounces@lists.zeromq.org] <b>Im Auftrag von \
</b>lists@chuckre</span><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>mes.com<br><b>Gesendet:</b> \
Freitag, 19. Mai 2017 15:29<br><b>An:</b> ZeroMQ development list<br><b>Betreff:</b> \
Re: [zeromq-dev] Porting libzmq to C++11<o:p></o:p></span></p></div></div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Looks like no one has read \
the blog posts I sent earlier in this thread. The original author of libzmq explains \
his rationale for avoiding C++ very well in these two posts. Please read \
them.<o:p></o:p></p><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p \
class=MsoNormal style='margin-bottom:12.0pt'><br><a \
href="http://250bpm.com/blog:4">http://250bpm.com/blog:4</a><br><br><a \
href="http://250bpm.com/blog:8">http://250bpm.com/blog:8</a><o:p></o:p></p><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Additionally, if \
you want to consider how to REWRITE libzmq, then look at how the original author of \
libzmq approached it.<o:p></o:p></p></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><a \
href="http://nanonmsg.org">http://nanonmsg.org</a><o:p></o:p></p></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>He rewrote it in C \
and named it something else. It isn't compatible with libzmq's wire protocol but it \
should give some ideas on how to adjust the architecture. Look at the code for \
it.<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p \
class=MsoNormal><br><br><o:p></o:p></p><div><p class=MsoNormal>On May 19, 2017, at \
8:21 AM, BJovke . &lt;<a href="mailto:bjovan@gmail.com">bjovan@gmail.com</a>&gt; \
wrote:<o:p></o:p></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div><p \
class=MsoNormal>I have a feeling that C++14 and C++17 are just improvements of \
C++11.<o:p></o:p></p><div><p class=MsoNormal>C++11 is the game changer, 14 and 17 \
don't bring ground breaking stuff.<o:p></o:p></p></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>I would be also \
happy to contribute to C++11 libzmq but I'm not sure how much stuff I can \
do.<o:p></o:p></p></div><div><p class=MsoNormal>I'm currently not familiar with inner \
workings of libzmq enough detailed to be confident to rewrite it, although I'm \
reading the docs and code day by day.<o:p></o:p></p></div><div><p class=MsoNormal>My \
time to spend is questionable, sometimes I have a lot of time and sometimes I cannot \
contribute for days or even weeks.<o:p></o:p></p></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>There are also \
many aspects of libzmq which make it hard to adopt the code, instead requiring \
complete rewrite:<o:p></o:p></p></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>2017-05-18 20:29 \
GMT+02:00 Jens Auer &lt;<a href="mailto:jens.auer@betaversion.net" \
target="_blank">jens.auer@betaversion.net</a>&gt;:<o:p></o:p></p><p \
class=MsoNormal>Hi,<br><br>I would be happy to contribute to such a project, even if \
many users will stay with the &quot;old&quot; code. For me, it is a great way to \
learn something. I would also be happy to aim for C++14 or even C++17 once it is \
officially released. I think structured bindings and the new if (init; \
condition)&nbsp; will be very helpful. C++17 also has \
std::optional.<br><br>Cheers,<br>Jens<br><br>-----Ursprüngliche \
Nachricht-----<br>Von: zeromq-dev [mailto:<a \
href="mailto:zeromq-dev-bounces@lists.zeromq.org">zeromq-dev-bounces@lists.zeromq.org</a>] \
Im Auftrag von Aram Santogidis<br>Gesendet: Donnerstag, 18. Mai 2017 10:57<br>An: \
ZeroMQ development list<br>Betreff: Re: [zeromq-dev] Porting libzmq to \
C++11<o:p></o:p></p><div><div><p class=MsoNormal><br>Hi,<br><br>a good reason to \
modernize the codebase, or even better to create a new project ala libzmq11, is to \
help its evolution with new networking technologies and software engineering \
practices.<br><br>As an example, consider the difficulties many faced (including \
myself) in extending ZeroMQ to support RDMA-based networking interfaces. The current \
design and implementation is hostile to such extensions.<br>Honestly, C++98 or not, I \
think it still can be done but with major cost in development effort and additional \
complexity to an already complex codebase.<br><br>Moving to C++11 and beyond is not \
merely an argument of fashion, as some of you implied, but it is vital for its \
future.<br>C++ and related technologies evolve and libzmq stays behind. \
New<br>developers are reluctant to contribute once they have a look at the current \
design and implementation (old school C++ roughly speaking).<br><br>Think for example \
when networking will be included in the standard, how much ugly code that juggles \
platform differences could be eliminated from the current implementation. Same \
applies for threading, which is in the standard since C++11.<br><br>I don't \
underestimate the importance (and the size?) of the current userbase. I'm aware from \
first-hand experience about some fairly critical software that relies on \
libzmq.<br><br>I guess the idea is to create i) a new project in the ZeroMQ \
organization that ii) implements ZMTP and iii) the non-depricated ZMQ socket types. \
The public API of libzmq should be a subset of the<br>libzmq11 so that will \
facilitate the transition of users, in the long term, that do not run on legacy \
systems.<br><br>I will happily contribute to such an effort provided that there will \
be at least one or two experienced members from the community that will join this \
effort.<br><br>Cheers,<br>Aram<br><br><br><br><br><br>On 17.05.2017 16:54, BJovke . \
wrote:<br>&gt; Well, you're right. There must be a good reason for such an \
undertaking.<br>&gt; I too feel that C++11 itself is not good enough reason.<br>&gt; \
Anyway there has to be enough people willing to contribute to it.<br>&gt;<br>&gt; I \
was just saying this because no idea should be discarded right away,<br>&gt; but for \
sure there needs to be a valid need and reason for it.<br>&gt;<br>&gt; \
Greetings.<br>&gt;<br>&gt; 2017-05-17 16:15 GMT+02:00 Doron Somech &lt;<a \
href="mailto:somdoron@gmail.com">somdoron@gmail.com</a><br>&gt; &lt;mailto:<a \
href="mailto:somdoron@gmail.com">somdoron@gmail.com</a>&gt;&gt;:<br>&gt;<br>&gt;&nbsp; \
&nbsp; &nbsp;What will be the benefit from moving to C++11? And more \
important<br>&gt;&nbsp; &nbsp; &nbsp;what is the benefit from having two projects? \
one supporting C++11<br>&gt;&nbsp; &nbsp; &nbsp;and one not?<br>&gt;<br>&gt;&nbsp; \
&nbsp; &nbsp;I think that maintaining two repositories is hard and not sure \
for<br>&gt;&nbsp; &nbsp; &nbsp;what cause?<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp;Anyway, \
if some one want to do it, in the zeromq philosophy, please<br>&gt;&nbsp; &nbsp; \
&nbsp;fork and add the project to the zeromq organization.<br>&gt;<br>&gt;&nbsp; \
&nbsp; &nbsp;On Wed, May 17, 2017 at 4:29 PM, &lt;<a \
href="mailto:lists@chuckremes.com">lists@chuckremes.com</a><br>&gt;&nbsp; &nbsp; \
&nbsp;&lt;mailto:<a href="mailto:lists@chuckremes.com">lists@chuckremes.com</a>&gt;&gt; \
wrote:<br>&gt;<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&gt; On May 17, 2017, \
at 7:56 AM, BJovke . &lt;<a href="mailto:bjovan@gmail.com">bjovan@gmail.com</a> \
&lt;mailto:<a href="mailto:bjovan@gmail.com">bjovan@gmail.com</a>&gt;&gt; \
wrote:<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp;&gt; Hello.<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;&gt; Libzmq is not even fully C++ compliant:<br>&gt;&nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;&gt;&nbsp; &nbsp;- There's no exception \
handling.<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&gt;&nbsp; &nbsp;- There are no \
RAII principles implemented.<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&gt;&nbsp; \
&nbsp;- Parent/child object hierarchy is loose or not implemented, all of the burden \
of proper order of calls is on programmer.<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&gt; And so on...<br>&gt;&nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&gt; C++11 \
is really a remarkable feat of engineering and me personally like to see fully C++11 \
implemented software.<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&gt; Unfortunately, \
for libzmq this would require substantial rewrite of the library.<br>&gt;&nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&gt; Maybe \
there's an option to create another parallel branch to existing libzmq or even create \
another product, for example &quot;libzmq11&quot;?<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;&gt; On the wire this could be 100% compatible with non-C++11 libzmq but there \
would be 0% chance to compile older projects with it.<br>&gt;<br>&gt;&nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;This is a good time to bring out some old blog posts. \
Martin<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Sustrik was the original developer of \
libzmq. He had some<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;thoughts on why he \
should have written the library in C instead<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;of C++. Here you go:<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a \
href="http://250bpm.com/blog:4" \
target="_blank">http://250bpm.com/blog:4</a><br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp;<a href="http://250bpm.com/blog:8" \
target="_blank">http://250bpm.com/blog:8</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;&nbsp; \
&nbsp; &nbsp; &nbsp; \
&nbsp;_______________________________________________<br>&gt;&nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp;zeromq-dev mailing list<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a \
href="mailto:zeromq-dev@lists.zeromq.org">zeromq-dev@lists.zeromq.org</a> \
&lt;mailto:<a href="mailto:zeromq-dev@lists.zeromq.org">zeromq-dev@lists.zeromq.org</a>&gt;<br>&gt;&nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;<a \
href="https://lists.zeromq.org/mailman/listinfo/zeromq-dev" \
target="_blank">https://lists.zeromq.org/mailman/listinfo/zeromq-dev</a><br>&gt;&nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;&lt;<a \
href="https://lists.zeromq.org/mailman/listinfo/zeromq-dev" \
target="_blank">https://lists.zeromq.org/mailman/listinfo/zeromq-dev</a>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;&nbsp; \
&nbsp; &nbsp;_______________________________________________<br>&gt;&nbsp; &nbsp; \
&nbsp;zeromq-dev mailing list<br>&gt;&nbsp; &nbsp; &nbsp;<a \
href="mailto:zeromq-dev@lists.zeromq.org">zeromq-dev@lists.zeromq.org</a> \
&lt;mailto:<a href="mailto:zeromq-dev@lists.zeromq.org">zeromq-dev@lists.zeromq.org</a>&gt;<br>&gt;&nbsp; \
&nbsp; &nbsp;<a href="https://lists.zeromq.org/mailman/listinfo/zeromq-dev" \
target="_blank">https://lists.zeromq.org/mailman/listinfo/zeromq-dev</a><br>&gt;&nbsp; \
&nbsp; &nbsp;&lt;<a href="https://lists.zeromq.org/mailman/listinfo/zeromq-dev" \
target="_blank">https://lists.zeromq.org/mailman/listinfo/zeromq-dev</a>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; \
--<br>&gt;<br>&gt; Jovan Bunjevački.<br>&gt;<br>&gt;<br>&gt; \
_______________________________________________<br>&gt; zeromq-dev mailing \


[Attachment #6 (text/plain)]

_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic