From 90bf63c8cd4a20dc2d4b9639bfdc7ba17bc10bb5 Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Sat, 30 Aug 2014 08:41:03 -0400 Subject: [PATCH] NEWS and manual update for #6081 --- NEWS.md | 4 ++++ doc/manual/types.rst | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index 74d1b55e3d839..d3c731731dc7c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,9 @@ New language features * Unicode version 7 is now supported for identifiers etcetera ([#7917]). + * Type parameters now permit any arbitrary `isbits` type, not just + `Int` and `Bool` ([#6081]). + Library improvements -------------------- @@ -905,6 +908,7 @@ Too numerous to mention. [#6056]: https://github.com/JuliaLang/julia/issues/6056 [#6057]: https://github.com/JuliaLang/julia/issues/6057 [#6073]: https://github.com/JuliaLang/julia/issues/6073 +[#6081]: https://github.com/JuliaLang/julia/issues/6081 [#6116]: https://github.com/JuliaLang/julia/issues/6116 [#6128]: https://github.com/JuliaLang/julia/issues/6128 [#6169]: https://github.com/JuliaLang/julia/issues/6169 diff --git a/doc/manual/types.rst b/doc/manual/types.rst index a0a2dda0c6449..a1af0a201a9e3 100644 --- a/doc/manual/types.rst +++ b/doc/manual/types.rst @@ -60,9 +60,11 @@ Julia's type system that should be mentioned up front are: distinction significant. - Only values, not variables, have types — variables are simply names bound to values. -- Both abstract and concrete types can be parameterized by other types - and by certain other values (currently integers, symbols, bools, and tuples thereof). - Type parameters may be completely omitted when they +- Both abstract and concrete types can be parameterized by other types. + They can also be parameterized by symbols, by values of any type for + which `isbits` returns true (essentially, things like numbers and bools + that are stored like C types or structs with no pointers to other objects), + and also by tuples thereof. Type parameters may be omitted when they do not need to be referenced or restricted. Julia's type system is designed to be powerful and expressive, yet