4 ms·
>>just to FORCE everyone to have to specify which language version they're targeting? There is a thought. I see a lot of trouble from this proposal because th
by frozenport 11y ago
>>just to FORCE everyone to have to specify which language version they're targeting?
There is a thought.
I see a lot of trouble from this proposal because the compilers and supplied libraries have a history of including extra things. Until quiet recently C++ headers would drop in C that nobody asked for. Personally, I was surprised to find that on Windows I could throw std::runtime_error.
At the end of the day a lot of code would break, because nobody is sure exactly what standard they are actually are using.
- kbenson 11y agoIs there a technical reason that would prevent the compiler from honoring a per-file pragma that allowed the developer to define how the code was expected to be interpreted by the compiler?
- eru 11y agoHaskell's GHC is doing exactly that. You can even mix and match pragmas for different extensions.
- kbenson 11y agoI know Perl has done the same for quite a while now.
- Argorak 11y agoI find it terribly confusing. It means that Haskell is almost never something I can expect a lot from, but a weird combination of extensions changing to "non-standard" behaviours.
- codygman 11y ago> It means that Haskell is almost never something I can expect a lot from, but a weird combination of extensions changing to "non-standard" behaviours. I can't think of a weird combination of behaviors from extensions that would change semantics... maybe it's because I don't use that many extensions usually. When I do they are related to type level programming and all they seem to affect is type inference.
- tome 11y agoAn example would be helpful.
- eru 11y agoNever confused me. In general, on a bigger project you'll have a bunch of approved extensions, and everything extra goes through very strict code review to see whether it helps more than it confuses.
- Argorak 11y agoIn a strictly controlled project, fine. But working with three different open source extensions that all use a different setup gets confusing quickly. Point being the same: Haskell as used is never quite standard Haskell.
- hendzen 11y agothere are ABI incompatibilities between the C++98/03 STL and the C++11 and C++14 STLs.
- kbenson 11y agoThat's unfortunate. I'm not too familiar with the intricacies of C++, but I assume you can't link multiple STL libs in a single binary? Edit: Added a "can't" that was accidentally omitted...
- Someone 11y agoI don't know whether you can, but it would be asking for trouble. Let's say you call function f in library L and get back a std::list, and then pass it to function g in library M, which linked to a different implementation of std:list. At best, that would lead to a crash.