Live data from Hacker News

Online LLVM-based C++ REPL

fiddle.jyt.io

11–19 of 19 posts

Re: Online LLVM-based C++ REPL

#12

It is a great idea in general and a technical feat in itself. It is just that C++ is not the best language for that type of programming. It may work OK for toy to lower-middle size of projects, but for big projects compilation time starts to pile up pretty quickly. One reason for that is C legacy of header files that are recompiled for each and every translation unit (yes there are PCH but they are unwieldy and requi…

Yes, C++ takes long to compile compared to other languages. But I never understood the problems people have with precompiled headers. They've worked just fine, without any tweaking or babysetting, for me since Visual Studio 6. That's 15+ years. I don't know how/if the implementations of gcc or clang work, but using the msvc compiler precompiled headers are braindead simple.

Re: Online LLVM-based C++ REPL

#14
post #10
post #9

Earlier quoted context omitted.

Actually, clang has had modules support (and one of the alternative C++ modules proposals for C++20) for quite a while now.

I ignored it on purpose, because it never evolved beyond a proof of concept. It only got production quality for Objective-C and Swift interoperability. Also it relied on an external description files, instead of extending C++.

"I ignored it on purpose, because it never evolved beyond a proof of concept."

This is false, it is used in production at Google for over 200+ million lines of C++. In fact, it's the only modules implementation actually used in production, AFAIK.

"It only got production quality for Objective-C and Swift interoperability."

Also false :)

"Also it relied on an external description files, instead of extending C++." Which means what, precisely? This is a means to compatibility, nothing else.

The other proposal basically breaks everything to make modules work (IE a non-modules compiler cannot work with the code once converted to modules). That may or may not be worth the cost compared to enabling incremental transitions.

Saying "it didn't extend C++" is a non-sequitur. What the standard accepts are extensions of C++. If the standard accepts that proposal, it's an extension of C++.

You could say using header files were "external description files" that didn't extend C++ before they were part of the standard.

Re: Online LLVM-based C++ REPL

#15
post #12

It is a great idea in general and a technical feat in itself. It is just that C++ is not the best language for that type of programming. It may work OK for toy to lower-middle size of projects, but for big projects compilation time starts to pile up pretty quickly. One reason for that is C legacy of header files that are recompiled for each and every translation unit (yes there are PCH but they are unwieldy and requi…

Yes, C++ takes long to compile compared to other languages. But I never understood the problems people have with precompiled headers. They've worked just fine, without any tweaking or babysetting, for me since Visual Studio 6. That's 15+ years. I don't know how/if the implementations of gcc or clang work, but using the msvc compiler precompiled headers are braindead simple.

they work just fine with GCC & Clang, too. If you use CMake, I recommend the cotire library : it's one line to add to get PCH on all platforms.

Re: Online LLVM-based C++ REPL

#16
post #10

Earlier quoted context omitted.

I ignored it on purpose, because it never evolved beyond a proof of concept. It only got production quality for Objective-C and Swift interoperability. Also it relied on an external description files, instead of extending C++.

"I ignored it on purpose, because it never evolved beyond a proof of concept." This is false, it is used in production at Google for over 200+ million lines of C++. In fact, it's the only modules implementation actually used in production, AFAIK. "It only got production quality for Objective-C and Swift interoperability." Also false :) "Also it relied on an external description files, instead of extending C++." Which…

> This is false, it is used in production at Google for over 200+ million lines of C++. In fact, it's the only modules implementation actually used in production, AFAIK.

Not all of us get to see what goes inside Google.

The only LLVM talk about modules was several years ago (2012) and then Doug went silent on his work. I never saw a single post on the ISO C++ mailing lists about modules and their progress.

> "It only got production quality for Objective-C and Swift interoperability." > > Also false :)

When I got to develop on Mac OS X system, it only worked properly with Objective-C code and for the system headers.

As far as I am aware you still can't use them with C++ on Sierra, at least there wasn't a single mention of it at WWDC on the LLVM and clang improvements talk.

I don't want to rely on external files to declare how #include should behave, I want to you module/import/export keywords and such.

Also I am on the side of those that don't want macros to escape modules.

Re: Online LLVM-based C++ REPL

#18
post #16

Earlier quoted context omitted.

"I ignored it on purpose, because it never evolved beyond a proof of concept." This is false, it is used in production at Google for over 200+ million lines of C++. In fact, it's the only modules implementation actually used in production, AFAIK. "It only got production quality for Objective-C and Swift interoperability." Also false :) "Also it relied on an external description files, instead of extending C++." Which…

> This is false, it is used in production at Google for over 200+ million lines of C++. In fact, it's the only modules implementation actually used in production, AFAIK. Not all of us get to see what goes inside Google. The only LLVM talk about modules was several years ago (2012) and then Doug went silent on his work. I never saw a single post on the ISO C++ mailing lists about modules and their progress. > "It only…

You wrote "I ignored it on purpose, because it never evolved beyond a proof of concept." I don't think "Not all of us get to see what goes inside Google" is a very good response to learning that you were wrong to the tune of 200+ million lines of code inside Google.

I don't care that much, right, but sometimes you see message board nerd bloody-mindedness to breathtaking degrees and you have to say something or the fluid in your eyeballs starts boiling.

Re: Online LLVM-based C++ REPL

#19
post #18
post #16

Earlier quoted context omitted.

> This is false, it is used in production at Google for over 200+ million lines of C++. In fact, it's the only modules implementation actually used in production, AFAIK. Not all of us get to see what goes inside Google. The only LLVM talk about modules was several years ago (2012) and then Doug went silent on his work. I never saw a single post on the ISO C++ mailing lists about modules and their progress. > "It only…

You wrote "I ignored it on purpose, because it never evolved beyond a proof of concept." I don't think "Not all of us get to see what goes inside Google" is a very good response to learning that you were wrong to the tune of 200+ million lines of code inside Google. I don't care that much, right, but sometimes you see message board nerd bloody-mindedness to breathtaking degrees and you have to say something or the fl…

If the clang guys cared that much about it, they would have invested some effort since 2012 to make it well known outside the chocolate factory.

As it happened the only truth that we in the outside world were made aware of, was what Apple was doing regarding Objective-C support.

So yeah I was wrong, but maybe clang guys should blog as much as VC++ about what is happening.

Another example is the ongoing support of the core guidelines.

I do follow all presentations from LLVM meetings, can you give me a link to any that I missed regarding modules post 2012?

Post reply on HN