#include <array> <cstdint> <functional> <iostream> <limits> <memory> <random> <string> <vector>
#include <algorithm>
#include <array>
#include <cstdint>
#include <functional>
#include <iostream>
#include <limits>
#include <memory>
#include <random>
#include <string>
#include <vector>
#include <algorithm> #include <array> #include <cstdint> #include <functional> #include <iostream> #include <limits>
#include <memory> #include <random> #include <string> #include <vector>
Hello,Did little research on this, testing the water with already cold feet.I find readability and editor estate could be improve if the #include statement would support multiple header files.
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7e2d9e7c-fc9b-4913-98bb-007ba5ae8806%40isocpp.org.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposal...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CA%2BgtASxnYc3T-LjLXvuJ361OmstDo2Wn%2B0hB3-_8rJNRuomyjw%40mail.gmail.com.
I'm not sure what "this" you mean here. IMO, there's nothing to do, all headers should stay one per line.
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/41771dd6-2803-b561-4349-f71f75127415%40gmail.com.
Maybe some simple rules could reduce the typical include list to this:#includeios, iostream, istream, fstream, ostream, streambuf, iomanip,
locale,
string, string_view
map, vector, list, queue, set, array,
utility, algorithm, functional, limits,
mutex condition_variable atomic,
memory;
On Thursday, March 8, 2018 at 12:57:40 PM UTC+13, stayp...@gmail.com wrote:Hello,Did little research on this, testing the water with already cold feet.I find readability and editor estate could be improve if the #include statement would support multiple header files.
#include <array> <cstdint> <functional> <iostream> <limits> <memory> <random> <string> <vector>instead of
#include <algorithm>
#include <array>
#include <cstdint>
#include <functional>
#include <iostream>
#include <limits>
#include <memory>
#include <random>
#include <string>
#include <vector>I though about this when opening a file with around 30 #include statement. With the file header, empty line, the editor with it's 55 viable line showed me nothing of substance. Maybe a simpler solution would be the editor to support folding of that piece of code. Unfortunately the one I used does not.For fun I tried the following code, but readability went down the drain. The 2 code formater I use did not expected that usage though ;-)
#include <algorithm> #include <array> #include <cstdint> #include <functional> #include <iostream> #include <limits>
#include <memory> #include <random> #include <string> #include <vector>Does that make any sense ?Regards,- Mario
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/56477ac8-020a-4c21-9d6e-a9cb4f70cdd3%40isocpp.org.
Python's style guide, PEP-8, says not to do it and to use one import per line: https://www.python.org/dev/peps/pep-0008/#imports
On 03/11/2018 06:24 AM, Barry Revzin wrote:
> Python allows you to have multiple imports on a single line, as you're proposing here.
>
> Python's style guide, PEP-8, says not to do it and to use one import per line: https://www.python.org/dev/peps/pep-0008/#imports
>
Doesn't this style of using one import per line violate the DRY principle:
https://en.wikipedia.org/wiki/Don%27t_repeat_yourself
For example:
import os
import sys
f(a,b);
...
f(c,d); // oops.We should never call f() anywhere else because DRY.
OK, to be more explicit:
There's no *semantic* difference between:
import os
import sys
and:
import os,sys
!sys
!os
!sys
!sys
include sys
include os
include foo
include bar
call sys;
call os;
call foo;
call bar;