SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
katastrofa
Posts: 8036
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

C++ Modules

May 17th, 2014, 10:47 am

QuoteOriginally posted by: katastrofaHow do the modules differ from static/dynamic libraries?I'm sorry if this question is stupid, but this is actually of practical interest to me.I currently pack pieces of my code into libraries to send them to my clients, who shouldn't see my code. The downsides are known. Are modules a better solution?a
Last edited by katastrofa on May 16th, 2014, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 59665
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

C++ Modules

May 17th, 2014, 12:01 pm

QuoteOriginally posted by: katastrofaQuoteOriginally posted by: katastrofaHow do the modules differ from static/dynamic libraries?I'm sorry if this question is stupid, but this is actually of practical interest to me.I currently pack pieces of my code into libraries to send them to my clients, who shouldn't see my code. The downsides are known. Are modules a better solution?aOn Windows, at least you can use 1. LIB filles2. dlls (in C)Which type do you give to clients?DLLs are probably better and satisfy your requirements. I suppose you want to call them from Excel?In .NET things are soooh much easier.IMO C dlls an LIBs are an approximation to modules, The downsides are knownWhat are those?
Last edited by Cuchulainn on May 16th, 2014, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 59665
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

C++ Modules

May 17th, 2014, 12:06 pm

We probably all have 4 mental models of what a module is. Now, Module-3 support them directly!Quote First and foremost, all compilation units are either INTERFACE or implementation MODULEs, of one flavor or another. An interface compilation unit, beginning with the keyword INTERFACE, defines constants, types, variables, exceptions, and procedures. The implementation module, beginning with the keyword MODULE, provides the actual code, and any further constants, types, or variables needed to implement the interface. By default an implementation module will implement the interface of the same name, but a module may explicitly EXPORT to a module not of the same name. just like .NET.
Last edited by Cuchulainn on May 16th, 2014, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 59665
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

C++ Modules

May 17th, 2014, 4:05 pm

QuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnQuoteThis has been known for 50 years. Stop being so negative and trying to pose as a know-it-all. It's not a theory they are trying to present as something new. It's a language extension they are trying get accepted, and which might be interesting to use. See my point? It's not about the 60s, it's about the next C++.It's all fairly standard stuff. And well known by many programmers. Broaden your scope and see how other languages have done it. So, when can we expect modules in C++?
Last edited by Cuchulainn on May 16th, 2014, 10:00 pm, edited 1 time in total.
 
User avatar
Hansi
Posts: 3300
Joined: January 25th, 2010, 11:47 am

C++ Modules

May 17th, 2014, 4:17 pm

QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: PolterSG2 Module design draft now availableTried download options. Gives error message 'Cannot download from google groups, cache...".MirrorQuoteOriginally posted by: CuchulainnIn .NET things are soooh much easier.But easily decompiled as well.
 
User avatar
Cuchulainn
Posts: 59665
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

C++ Modules

May 17th, 2014, 4:37 pm

QuoteOriginally posted by: HansiQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: PolterSG2 Module design draft now availableTried download options. Gives error message 'Cannot download from google groups, cache...".MirrorQuoteOriginally posted by: CuchulainnIn .NET things are soooh much easier.But easily decompiled as well.Thanks. I'll read it and get back. Those ildasmers...
 
User avatar
katastrofa
Posts: 8036
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

C++ Modules

May 18th, 2014, 8:23 pm

QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: katastrofaQuoteOriginally posted by: katastrofaHow do the modules differ from static/dynamic libraries?I'm sorry if this question is stupid, but this is actually of practical interest to me.I currently pack pieces of my code into libraries to send them to my clients, who shouldn't see my code. The downsides are known. Are modules a better solution?aOn Windows, at least you can use 1. LIB filles2. dlls (in C)Which type do you give to clients?DLLs are probably better and satisfy your requirements. I suppose you want to call them from Excel?In .NET things are soooh much easier.IMO C dlls an LIBs are an approximation to modules, The downsides are knownWhat are those?I use simple DLL libraries with External interface using stateless functional API.The problems with this solution are caused by different implementations of STL by different compilers, different binary versions of STL containers depending on the compilation options, etc. Of course I can provide all necessary classes to communicate with the EI, but it makes things much less straighforward and it feels somewhat uncanny.a
 
User avatar
katastrofa
Posts: 8036
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

C++ Modules

May 19th, 2014, 8:57 pm

QuoteOriginally posted by: outruncan't you compile everything (e.g. also the STL binaries) into *one* selfcontained dll/lib?But what if there is another katastrofa who went to another forum and met another outrun who gave her the same advice?a
 
User avatar
katastrofa
Posts: 8036
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

C++ Modules

May 19th, 2014, 9:09 pm

I'm sorry, I'm simply wondering what would happen if my clients already had some dlls/libs with the STL binaries compiled into them.
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On