Serving the Quantitative Finance Community

 
User avatar
Cuchulainn
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

C++ Modules

June 11th, 2014, 5:04 pm

QuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnQuoteRegarding the quotes question: nothing will happen! STL is a*template* library those are always compiled into them. You can't have a dll or lib with templates (but there are new things coming in C++ in that respect).What are these new things? I suspect .NET has them now.Hmf, I can't find it anymore! Is was is some mail about a C++17 feature on modules involving templates.No hurry C++ 17 == 2021?
Last edited by Cuchulainn on June 10th, 2014, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

C++ Modules

April 3rd, 2016, 7:00 pm

C++17 modules?????? QuoteModules would save me tens of minutes everyday and hours every week! They would remove most inconsistencies we have to deal with constantly, cut significantly compile times and most important of all remove that "are you seriously using this crap" look from non-C++ people's face when you explain them the massive hack that is the PIMPL Idiom. I can't believe the C++ committee is taking up to 2020 to add something so needed to the language, other entities can create, push and phase out 3 languages in the same time, the US can change 2 presidents, a kid can be conceived, born and start primary school!
Last edited by Cuchulainn on April 2nd, 2016, 10:00 pm, edited 1 time in total.
 
User avatar
katastrofa
Posts: 7440
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

C++ Modules

April 4th, 2016, 7:55 pm

@ "Modules would [...] most important of all remove that "are you seriously using this crap" look from non-C++ people's face when you explain them the massive hack that is the PIMPL Idiom."How?
 
User avatar
Cuchulainn
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

C++ Modules

April 5th, 2016, 6:50 am

QuoteOriginally posted by: katastrofa@ "Modules would [...] most important of all remove that "are you seriously using this crap" look from non-C++ people's face when you explain them the massive hack that is the PIMPL Idiom."How?Absolutely.C# uses assemblies/dlls, interfaces and namespaces which is essentially modules that you can load into the application. So neat. I suppose Java is similar. Anecdotal evidence suggests C# developer productivity can be [3,4] times that of C++.DLL does not work with C++, only C. However, assemblies are possible in C++/CLI.pimp (aka Cheshire Cat) was invented by the late John Carolan in ~ 1988. It was needed at the time because of long compilation times on 286 pcs.Lack of modules is a major road block IMO. Consequences1. Top down decomposition into loosely couples subsystems difficult. Engineers work with block diagrams and less with Grammar, as @farmer has described.2. Cannot see the architecture until system has been coded.3. Maintenance costs.
Last edited by Cuchulainn on April 4th, 2016, 10:00 pm, edited 1 time in total.
 
User avatar
katastrofa
Posts: 7440
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

C++ Modules

April 5th, 2016, 8:42 am

QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: katastrofa@ "Modules would [...] most important of all remove that "are you seriously using this crap" look from non-C++ people's face when you explain them the massive hack that is the PIMPL Idiom."How?Absolutely.C# uses assemblies/dlls, interfaces and namespaces which is essentially modules that you can load into the application. So neat. I suppose Java is similar. Anecdotal evidence suggests C# developer productivity can be [3,4] times that of C++.DLL does not work with C++, only C. However, assemblies are possible in C++/CLI.pimp (aka Cheshire Cat) was invented by the late John Carolan in ~ 1988. It was needed at the time because of long compilation times on 286 pcs.Lack of modules is a major road block IMO. Consequences1. Top down decomposition into loosely couples subsystems difficult. Engineers work with block diagrams and less with Grammar, as @farmer has described.2. Cannot see the architecture until system has been coded.3. Maintenance costs.I am aware of modules' functionalities. I only don't see how they could replace PIMPL (which I find quite useful and don't see any problems with it, I'm not a programmer though; farmer's thread below? -- please...).
Last edited by katastrofa on April 4th, 2016, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

C++ Modules

April 5th, 2016, 8:52 am

QuoteOriginally posted by: katastrofaQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: katastrofa@ "Modules would [...] most important of all remove that "are you seriously using this crap" look from non-C++ people's face when you explain them the massive hack that is the PIMPL Idiom."How?Absolutely.C# uses assemblies/dlls, interfaces and namespaces which is essentially modules that you can load into the application. So neat. I suppose Java is similar. Anecdotal evidence suggests C# developer productivity can be [3,4] times that of C++.DLL does not work with C++, only C. However, assemblies are possible in C++/CLI.pimp (aka Cheshire Cat) was invented by the late John Carolan in ~ 1988. It was needed at the time because of long compilation times on 286 pcs.Lack of modules is a major road block IMO. Consequences1. Top down decomposition into loosely couples subsystems difficult. Engineers work with block diagrams and less with Grammar, as @farmer has described.2. Cannot see the architecture until system has been coded.3. Maintenance costs.I am aware of modules' functionalities. I only don't see how they could replace PIMPL (which I find quite useful and don't see any problems with it, I'm not a programmer though; farmer's thread below? -- please...).What is a module in your definition? pimpl is useful and a fix. It's 80's technology. And these days we have smart pointers (see Meyers' item #22).
Last edited by Cuchulainn on April 4th, 2016, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

C++ Modules

April 5th, 2016, 9:01 am

QuoteIn software design, modularity refers to a logical partitioning of the "software design" that allows complex software to be manageable for the purpose of implementation and maintenance. The logic of partitioning may be based on related functions, implementation considerations, data links, or other criteria.So, how do you break the software system into modules? C# easy, C++ difficult. Don't see how pimpl idiom will help except by pure luck. Maybe I'm missing the point. The analogy is building a house by a team of electricians.
Last edited by Cuchulainn on April 4th, 2016, 10:00 pm, edited 1 time in total.
 
User avatar
katastrofa
Posts: 7440
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

C++ Modules

April 19th, 2016, 8:22 pm

QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: katastrofaQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: katastrofa@ "Modules would [...] most important of all remove that "are you seriously using this crap" look from non-C++ people's face when you explain them the massive hack that is the PIMPL Idiom."How?Absolutely.C# uses assemblies/dlls, interfaces and namespaces which is essentially modules that you can load into the application. So neat. I suppose Java is similar. Anecdotal evidence suggests C# developer productivity can be [3,4] times that of C++.DLL does not work with C++, only C. However, assemblies are possible in C++/CLI.pimp (aka Cheshire Cat) was invented by the late John Carolan in ~ 1988. It was needed at the time because of long compilation times on 286 pcs.Lack of modules is a major road block IMO. Consequences1. Top down decomposition into loosely couples subsystems difficult. Engineers work with block diagrams and less with Grammar, as @farmer has described.2. Cannot see the architecture until system has been coded.3. Maintenance costs.I am aware of modules' functionalities. I only don't see how they could replace PIMPL (which I find quite useful and don't see any problems with it, I'm not a programmer though; farmer's thread below? -- please...).What is a module in your definition? pimpl is useful and a fix. It's 80's technology. And these days we have smart pointers (see Meyers' item #22).I use PIMPL as an extra layer of abstraction, which allows more freedom in changing the code structure, without subsequent need to recompile the unchanged code that uses it. I've never thought of it as a fix or a hack, otherwise I wouldn't use it. OK, you can say that modules enable doing the same at the binary level, but from the code design viewpoint they are something else. I used to use modules in Fortran or once for callbacks in JavaScript...
 
User avatar
Cuchulainn
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

C++ Modules

April 20th, 2016, 6:50 am

QuoteOriginally posted by: katastrofaQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: katastrofaQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: katastrofa@ "Modules would [...] most important of all remove that "are you seriously using this crap" look from non-C++ people's face when you explain them the massive hack that is the PIMPL Idiom."How?Absolutely.C# uses assemblies/dlls, interfaces and namespaces which is essentially modules that you can load into the application. So neat. I suppose Java is similar. Anecdotal evidence suggests C# developer productivity can be [3,4] times that of C++.DLL does not work with C++, only C. However, assemblies are possible in C++/CLI.pimp (aka Cheshire Cat) was invented by the late John Carolan in ~ 1988. It was needed at the time because of long compilation times on 286 pcs.Lack of modules is a major road block IMO. Consequences1. Top down decomposition into loosely couples subsystems difficult. Engineers work with block diagrams and less with Grammar, as @farmer has described.2. Cannot see the architecture until system has been coded.3. Maintenance costs.I am aware of modules' functionalities. I only don't see how they could replace PIMPL (which I find quite useful and don't see any problems with it, I'm not a programmer though; farmer's thread below? -- please...).What is a module in your definition? pimpl is useful and a fix. It's 80's technology. And these days we have smart pointers (see Meyers' item #22).I use PIMPL as an extra layer of abstraction, which allows more freedom in changing the code structure, without subsequent need to recompile the unchanged code that uses it. I've never thought of it as a fix or a hack, otherwise I wouldn't use it. OK, you can say that modules enable doing the same at the binary level, but from the code design viewpoint they are something else. I used to use modules in Fortran or once for callbacks in JavaScript...You can use something, you probably don't know any better :) pimpl is a fix, but never mind. It is a code-level trick and does not scale.C# has assemblies which is a good benchmark for module. An assembly is self-reflective.Fortran modules are something else. AFAIR I think they are close to assemblies.
Last edited by Cuchulainn on April 19th, 2016, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

C++ Modules

April 20th, 2016, 7:04 am

a dll is a module? Of course, someone should define what a module is;)
Last edited by Cuchulainn on April 19th, 2016, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

C++ Modules

May 16th, 2016, 10:17 am

DLL in C++ This library was designed to simplify plugin development using C++ in a portable cross-platform manner.
Last edited by Cuchulainn on May 15th, 2016, 10:00 pm, edited 1 time in total.
 
User avatar
katastrofa
Posts: 7440
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

C++ Modules

May 17th, 2016, 6:52 pm

It's for dynamic DLL, I presume? Otherwise, what's to simplify...
 
User avatar
Cuchulainn
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

C++ Modules

May 17th, 2016, 8:08 pm

QuoteOriginally posted by: katastrofaIt's for dynamic DLL, I presume? Otherwise, what's to simplify...It looks like you can load _classes_ and interfaces in contrast to flat C Windows dlls.looks like .NET assemblies I plan to investigate. If it works then it will be cool for large scale software components.Can we make a DLL in Linux gnu and import it to Visual Studio 2015?
Last edited by Cuchulainn on May 16th, 2016, 10:00 pm, edited 1 time in total.
 
User avatar
katastrofa
Posts: 7440
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

C++ Modules

May 18th, 2016, 9:40 pm

I haven't tried, but it looks possible: http://www.blogcompiler.com/2010/07/11/ ... -linux/E.g. NLopt is a standalone library compiled with MinGW for Windows AFAIK.