News for hackers. Stuff that matters.
Re:A Module System for C++ (Revision 2) [pdf] by pjmlp on Tuesday October 14, 2014 @04:07PM (#8455463)
I just wonder, if waiting until C++17 gets done and available across all major compilers in all platforms, not just the C++ triad that gets discussed on HN, won't be a kind of "too little, too late" kind of thing.
Re:A Module System for C++ (Revision 2) [pdf] by ben0x539 on Tuesday October 14, 2014 @04:10PM (#8455480)
I think people who are invested in C++ now won't suddenly stop being invested in it by the time C++17 rolls around.
Re:A Module System for C++ (Revision 2) [pdf] by pjmlp on Tuesday October 14, 2014 @04:42PM (#8455676)
Many people are invested in C++, because in the last 20 years there was an investment in VM based runtimes, effectively leaving C and C++ as the only to go languages if one was looking for ahead of time compilation[0].

Now with Java and .NET upcoming adoption of ahead of time compilation to native code in the next versions.

Additionally with other languages like D, Rust, Go, Swift, Ada, Haskell, OCaml fighting for a place at the Sun.

There will be lots of options for those looking into languages with support for ahead-of-time compilation to native code in their reference implementations.

Thus pushing C++ deeper into the OS realm, while at the same time giving to those people other options to look for.

Hence my remark.

[0] There were other options, but they were largely ignored by the mainstream.

Re:A Module System for C++ (Revision 2) [pdf] by coliveira on Tuesday October 14, 2014 @10:18PM (#8456884)
The problem is not just ahead of time compilation. This has been available for a long time on Pascal, OCaml, Ada, and even Lisp. C++ offers access to lower level programming constructs that makes it very efficient to program things like games, numeric algorithms, device drivers, desktop applications, and many more areas that depend on these C++ features.
Re:A Module System for C++ (Revision 2) [pdf] by pjmlp on Wednesday October 15, 2014 @12:56AM (#8457231)
Apparently you didn't read my footnote, those are some of the languages ignored by the mainstream.

Funny that you list Ada and then ignore it offers the same features for systems programming as C++.

Re:A Module System for C++ (Revision 2) [pdf] by lomnakkus on Wednesday October 15, 2014 @05:17PM (#8461818)
The thing is: If you use a non-C/C++ language you'll inevitably have to interface with some C or C++ code (your OS API, whether that be POSIXish or whatever.). There can be a lot of friction/impedance mismatch at this point, especially if your language uses novel ways of managing resources and/or memory. I'm guessing this is why a lot of Application-level GUI code still gets written in C/C++, e.g. in Qt, KDE or GNOME.

"Worse is Better" is Worse in the long run, I guess.

Re:A Module System for C++ (Revision 2) [pdf] by ben0x539 on Tuesday October 14, 2014 @06:02PM (#8456069)
I agree, and am cautiously optimistic that people will have more options in or close to C++'s niche in the future. My comment was made with regards to the (surely significant?) market share of people who opted for C++ in the past and are stuck with it for better or worse.

But even just considering new projects, I'd expect that C++'s inertia in terms of reputation, ecosystem and people's skillset/experience means that C++17 or even later will have plenty of time to measure up against the competition.

Re:A Module System for C++ (Revision 2) [pdf] by pjmlp on Tuesday October 14, 2014 @06:09PM (#8456093)
Sure! Myself I always liked it, just prefer to explore other options as well.

You are right, though.

Re:A Module System for C++ (Revision 2) [pdf] by dragontamer on Tuesday October 14, 2014 @04:31PM (#8455608)
Cobol programmers were excited about Cobol2014 updates.

C++ will continue to be used, much like Cobol has continued to be used for an eternity.

Re:A Module System for C++ (Revision 2) [pdf] by kyberias on Tuesday October 14, 2014 @04:49PM (#8455721)
Is that a fair comparison, though? Do we really see people writing significant new software using Cobol as we see using C++? We don't. Right now we're all probably running a lot of software written in C++ (hello, browser!) but none in Cobol.
Re:A Module System for C++ (Revision 2) [pdf] by dragontamer on Tuesday October 14, 2014 @05:05PM (#8455810)
You'd be surprised.

I've got coworkers who's first job in the programming business was Cobol maintenance. Old programmers from the 1960s are retiring in their 80s, and they need maintainers to write new code for various ancient mainframe systems.

Do remember, IBM is still selling System/360 systems today. http://en.wikipedia.org/wiki/IBM_System_z

These systems are running Cobol code from the 1960s, and they need to be updated to include XML, REST and all the other latest developments of development.

http://www.itworldcanada.com/article/the-future-of-cobol-why...

Similarly, C++ programmers are probably going to have an even _larger_ legacy than Cobol.

Cobol is very much alive today.

http://www.veryant.com/

In fact by some measurements, Cobol is still more popular than Java and Javascript.

http://www.computerworld.com/article/2502430/data-center/cob...

Re:A Module System for C++ (Revision 2) [pdf] by agumonkey on Tuesday October 14, 2014 @05:25PM (#8455923)
Weird, IBM has been trying to replace bare COBOL with higher level languages for years. And between old crufty COBOL code, compiled COBOL as target code .. I really wonder who enjoys it nowadays.
Re:A Module System for C++ (Revision 2) [pdf] by derefr on Tuesday October 14, 2014 @07:46PM (#8456472)
Personally, if I had to deal with COBOL, not only would I treat COBOL as a "target language", I'd write a decompiler to turn COBOL back into a sensible language and run it over the entire codebase.
Re:A Module System for C++ (Revision 2) [pdf] by agumonkey on Wednesday October 15, 2014 @07:15AM (#8457895)
The problem with COBOL is it's more a DSL[1] than a general purpose one, except it's been abused and extended to do so.

[1] from my short readings, it's suited for simple table processing.

Re:A Module System for C++ (Revision 2) [pdf] by pjmlp on Wednesday October 15, 2014 @03:55AM (#8457542)
Good luck finding a mainframe user that would accept it.
Re:A Module System for C++ (Revision 2) [pdf] by agumonkey on Wednesday October 15, 2014 @05:35AM (#8457703)
They already deal with that. I remember the face of a seasoned dev trying to scare me with full pages of compiled code fixed by hand.
Re:A Module System for C++ (Revision 2) [pdf] by dragontamer on Tuesday October 14, 2014 @08:14PM (#8456586)

     Weird, IBM has been trying to replace bare COBOL with higher level languages for years.
Probably not even "years", and closer to "decades" at this point.
Re:A Module System for C++ (Revision 2) [pdf] by agumonkey on Wednesday October 15, 2014 @05:34AM (#8457700)
I was trying to be conservative.
Re:A Module System for C++ (Revision 2) [pdf] by kyberias on Tuesday October 14, 2014 @04:56PM (#8455760)
What is your point? And what is "C++ triad"?
Re:A Module System for C++ (Revision 2) [pdf] by pjmlp on Tuesday October 14, 2014 @05:21PM (#8455902)
> What is your point?

The point is that many of us, go to C++ because it is one of the few languages with ahead-of-time compilers available across multiple systems.

Now that we are experiencing a going native wave in terms of compiler toolchains for other programming languages, that reason is slowly becoming less relevant.

So many might choose another language, instead of waiting a few more years for the support to appear.

> And what is "C++ triad"?

gcc, clang and Visual C++.

HN posts about C and C++ tend to forget there are many more C and C++ compilers out there.

Re:A Module System for C++ (Revision 2) [pdf] by repsilat on Tuesday October 14, 2014 @05:16PM (#8455873)
Possibly g++, clang and MSVC? Or Linux, Windows and OS X?
Re:A Module System for C++ (Revision 2) [pdf] by pjmlp on Tuesday October 14, 2014 @05:24PM (#8455915)
Both.

There are lots of compilers and OS out there besides those.

Which are what get discussed here most of the time.

Re:A Module System for C++ (Revision 2) [pdf] by GFK_of_xmaspast on Tuesday October 14, 2014 @09:53PM (#8456830)
There's what, Portland, Wind River, ????? I heard intel's wrapped around clang these days.
Re:A Module System for C++ (Revision 2) [pdf] by jzwinck on Tuesday October 14, 2014 @10:20PM (#8456892)
Here are some:

http://en.wikipedia.org/wiki/Oracle_Solaris_Studio

http://en.wikipedia.org/wiki/HP_aC%2B%2B

http://en.wikipedia.org/wiki/IBM_XL_C%2B%2B

Notably, each of those can target an OS and hardware architecture made by the same vendor (Sun Solaris/SPARC, HP UX/PA-RISC, IBM AIX/POWER).

Re:A Module System for C++ (Revision 2) [pdf] by pjmlp on Wednesday October 15, 2014 @03:04AM (#8457439)
Portland, Wind River, Intel ICC, Borland C++ Builder, Aix XL C++, HP-UX HP aC++, OS 400 XL C++, ARM DS C++, TI C++, SN Systems C++, ...

Not even half of them are already full C++11 compliant.