Skip to content

Renaming the upcoming global import file to std.experimental.all #6186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
`import std.experimental.scripting` as a global convenience import
`import std.experimental.all` as a global convenience import

$(MREF std,experimental,scripting) allows convenient use of all Phobos modules
$(MREF std,experimental,all) allows convenient use of all Phobos modules
with one import:

---
import std.experimental.scripting;
import std.experimental.all;
void main()
{
10.iota.map!log.sum.writeln;
Expand All @@ -13,11 +13,11 @@ void main()

For short scripts a lot of imports are often needed to get all the
modules from the standard library.
With this release it's possible to use `import std.experimental.scripting` for importing the entire
With this release it's possible to use `import std.experimental.all` for importing the entire
standard library at once. This can be used for fast prototyping or REPLs:

---
import std.experimental.scripting;
import std.experimental.all;
void main()
{
6.iota
Expand All @@ -34,6 +34,6 @@ In this case, $(LINK2 $(ROOT)spec/module.html#static_imports, static imports) or
$(LINK2 $(ROOT)spec/module.html#renamed_imports, renamed imports) can be used
to uniquely select a specific symbol.

The baseline cost for `import std.experimental.scripting`
The baseline cost for `import std.experimental.all`
is less than half a second (varying from system to system) and
work is in progress to reduce this overhead even further.
2 changes: 1 addition & 1 deletion posix.mak
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ PACKAGE_std = array ascii base64 bigint bitmanip compiler complex concurrency \
outbuffer parallelism path process random signals socket stdint \
stdio string system traits typecons uni \
uri utf uuid variant xml zip zlib
PACKAGE_std_experimental = checkedint typecons scripting
PACKAGE_std_experimental = all checkedint typecons
PACKAGE_std_algorithm = comparison iteration mutation package searching setops \
sorting
PACKAGE_std_container = array binaryheap dlist package rbtree slist util
Expand Down
6 changes: 3 additions & 3 deletions std/experimental/scripting.d → std/experimental/all.d
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/++
Convenience file that allows to import entire Phobos in one command.
+/
module std.experimental.scripting;
module std.experimental.all;

///
@safe unittest
{
import std.experimental.scripting;
import std.experimental.all;

int len;
const r = 6.iota
Expand All @@ -23,7 +23,7 @@ module std.experimental.scripting;
///
@safe unittest
{
import std.experimental.scripting;
import std.experimental.all;
assert(10.iota.map!(partial!(pow, 2)).sum == 1023);
}

Expand Down
2 changes: 1 addition & 1 deletion win32.mak
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ SRC_STD_INTERNAL_WINDOWS= \
std\internal\windows\advapi32.d

SRC_STD_EXP= \
std\experimental\checkedint.d std\experimental\typecons.d std\experimental\scripting.d
std\experimental\all.d std\experimental\checkedint.d std\experimental\typecons.d

SRC_STD_EXP_ALLOC_BB= \
std\experimental\allocator\building_blocks\affix_allocator.d \
Expand Down
2 changes: 1 addition & 1 deletion win64.mak
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ SRC_STD_INTERNAL_WINDOWS= \
std\internal\windows\advapi32.d

SRC_STD_EXP= \
std\experimental\checkedint.d std\experimental\typecons.d std\experimental\scripting.d
std\experimental\all.d std\experimental\checkedint.d std\experimental\typecons.d

SRC_STD_EXP_ALLOC_BB= \
std\experimental\allocator\building_blocks\affix_allocator.d \
Expand Down