www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Beta 2.108.0

reply Iain Buclaw <ibuclaw gdcproject.org> writes:
Glad to announce the first beta for the 2.108.0 release, ♥ to the 
35 contributors.

This release comes with 7 major changes and 48 fixed Bugzilla 
issues, including:

  - In the language, support has been added for Interpolated 
Expression Sequences.
  - In phobos, std.uni has been upgraded to Unicode 15.1.0.
  - In dub, the fetch command now supports multiple arguments, 
recursive fetch, and is project-aware.

http://dlang.org/download.html#dmd_beta
http://dlang.org/changelog/2.108.0.html

As usual please report any bugs at
https://issues.dlang.org

-Iain
on behalf of the Dlang Core Team
Mar 02
next sibling parent reply Iain Buclaw <ibuclaw gdcproject.org> writes:
The RC for 2.108 has been released, which includes the following 
changes from the initial beta:

  - Named Arguments is now implemented and documented as a new 
feature in this release. The beta supports the feature, but was 
left undocumented while some remaining issues were being fixed.

  - Hexstrings now implicitly convert to integer arrays. The beta 
had introduced support to allow casting to arrays only.

http://dlang.org/download.html#dmd_beta
http://dlang.org/changelog/2.108.0.html

As usual please report any bugs at
https://issues.dlang.org

-Iain
on behalf of the Dlang Core Team
Mar 16
next sibling parent reply Daniel N <no public.email> writes:
On Saturday, 16 March 2024 at 09:26:20 UTC, Iain Buclaw wrote:
 The RC for 2.108 has been released, which includes the 
 following changes from the initial beta:

  - Named Arguments is now implemented and documented as a new 
 feature in this release. The beta supports the feature, but was 
 left undocumented while some remaining issues were being fixed.

  - Hexstrings now implicitly convert to integer arrays. The 
 beta had introduced support to allow casting to arrays only.

 http://dlang.org/download.html#dmd_beta
 http://dlang.org/changelog/2.108.0.html

 As usual please report any bugs at
 https://issues.dlang.org

 -Iain
 on behalf of the Dlang Core Team
```d union U { float asFloat; uint asInt; } auto u0 = U(1.0); // this sets the `asFloat` field auto u1 = U(asInt: 0x3F800000); // formerly not possible ``` Wow, this is so cool, can't wait to try it out, thanks to everyone who made it happen!
Mar 16
parent =?UTF-8?Q?S=C3=B6nke_Ludwig?= <sludwig outerproduct.org> writes:
Am 16.03.2024 um 11:31 schrieb Daniel N:
 ```d
 union U
 {
      float asFloat;
      uint asInt;
 }
 
 auto u0 = U(1.0); // this sets the `asFloat` field
 auto u1 = U(asInt: 0x3F800000); // formerly not possible
 ```
 
 Wow, this is so cool, can't wait to try it out, thanks to everyone who 
 made it happen!
 
Note that this has already been possible in places where the {} syntax can be used: auto u1 = {asInt: 0x3F800000}; Still great to see this officially implemented!
Mar 20
prev sibling next sibling parent Lance Bachmeier <no spam.net> writes:
On Saturday, 16 March 2024 at 09:26:20 UTC, Iain Buclaw wrote:
 The RC for 2.108 has been released, which includes the 
 following changes from the initial beta:

  - Named Arguments is now implemented and documented as a new 
 feature in this release. The beta supports the feature, but was 
 left undocumented while some remaining issues were being fixed.

  - Hexstrings now implicitly convert to integer arrays. The 
 beta had introduced support to allow casting to arrays only.

 http://dlang.org/download.html#dmd_beta
 http://dlang.org/changelog/2.108.0.html

 As usual please report any bugs at
 https://issues.dlang.org

 -Iain
 on behalf of the Dlang Core Team
It's only getting a quick mention in the middle of the list of bug fixes, but "Bugzilla 24397: Support C preprocessor function-like macros" is a big deal for ImportC - that was the final piece needed to use ImportC with large C files without manual intervention. (At least that's the case for the code I'm working with.)
Mar 16
prev sibling parent Martin Tschierschke <mt smartdolphin.de> writes:
On Saturday, 16 March 2024 at 09:26:20 UTC, Iain Buclaw wrote:
 The RC for 2.108 has been released, which includes the 
 following changes from the initial beta:

  - Named Arguments is now implemented and documented as a new 
 feature in this release. The beta supports the feature, but was 
 left undocumented while some remaining issues were being fixed.

  - Hexstrings now implicitly convert to integer arrays. The 
 beta had introduced support to allow casting to arrays only.

 http://dlang.org/download.html#dmd_beta
 http://dlang.org/changelog/2.108.0.html
Great release! "Named Arguments" and "String Interpolation" called: "Interpolated Expression Sequences"
Mar 21
prev sibling next sibling parent Anonymouse <zorael gmail.com> writes:
On Saturday, 2 March 2024 at 17:40:29 UTC, Iain Buclaw wrote:
 [...]
 Named arguments for functions have been implemented and 
 documented
Yay, I was really looking forward to this. I currently use `std.typecons.Flag` virtually *everywhere* to make sure I don't confuse parameters. ```d auto doThing( const string what, const Flag!"foo" foo, const Flag!"bar" bar, const Flag!"baz" baz = No.baz) { // ... } auto thing = doThing("asdf", Yes.foo, No.bar, Yes.baz); ``` It will take some time adapting to but I welcome the addition.
Mar 20
prev sibling parent reply WebFreak001 <d.forum webfreak.org> writes:
On Saturday, 2 March 2024 at 17:40:29 UTC, Iain Buclaw wrote:
 Glad to announce the first beta for the 2.108.0 release, ♥ to 
 the 35 contributors.

 This release comes with 7 major changes and 48 fixed Bugzilla 
 issues, including:

  - In the language, support has been added for Interpolated 
 Expression Sequences.
  - In phobos, std.uni has been upgraded to Unicode 15.1.0.
  - In dub, the fetch command now supports multiple arguments, 
 recursive fetch, and is project-aware.

 http://dlang.org/download.html#dmd_beta
 http://dlang.org/changelog/2.108.0.html

 As usual please report any bugs at
 https://issues.dlang.org

 -Iain
 on behalf of the Dlang Core Team
woah this release is amazing! It's solving some of my long standing pain points missing with the language (in particular named arguments as struct initializer replacements and interpolated strings) - the other features may only be very niche things, however they are absolutely plenty appreciated since they drastically make things easier (hexstrings) or even possible in the first place (magic initializer thingies) for library code and generated code. This gives me excitement like older D releases used to feel again, as well as in the forums real usage of D in projects or samples instead of pointless discussions seem to also be gaining more popularity again. Can't wait for the full release, gonna try out using new features from this beta one already.
Mar 20
parent reply Salih Dincer <salihdb hotmail.com> writes:
On Thursday, 21 March 2024 at 02:14:36 UTC, WebFreak001 wrote:
 On Saturday, 2 March 2024 at 17:40:29 UTC, Iain Buclaw wrote:
 .. since they drastically make things easier (hexstrings) or 
 even possible in the first place (magic initializer thingies) 
 for library code and generated code.
I cannot say the same thing. It is thought-provoking that even the toHex() function, which should be in std.conv, was not included and we had to write it ourselves. SDB 79
Mar 20
parent reply Andrea Fontana <nospam example.org> writes:
On Thursday, 21 March 2024 at 03:19:16 UTC, Salih Dincer wrote:
 On Thursday, 21 March 2024 at 02:14:36 UTC, WebFreak001 wrote:
 On Saturday, 2 March 2024 at 17:40:29 UTC, Iain Buclaw wrote:
 .. since they drastically make things easier (hexstrings) or 
 even possible in the first place (magic initializer thingies) 
 for library code and generated code.
I cannot say the same thing. It is thought-provoking that even the toHex() function, which should be in std.conv, was not included and we had to write it ourselves. SDB 79
This? ``` import std; void main() { int number = 32409; auto hex = format("%X", number); writeln(hex); } ``` or: ``` auto toHex(N)(N number) if (isIntegral!N) { return "%X".format(number); } ... auto hex = 3432.toHex(); ... ```
Mar 21
parent Salih Dincer <salihdb hotmail.com> writes:
On Thursday, 21 March 2024 at 09:16:07 UTC, Andrea Fontana wrote:
 This?

 ```d
 auto toHex(N)(N number) if (isIntegral!N) { return 
 "%X".format(number); }
 ```
No, you respect your efforts. Simple solutions without memory allocation are needed. Moreover, there are already very good algorithms in the runtime: https://github.com/dlang/dmd/blob/master/druntime/src/core/internal/string.d#L34 SDB 79
Mar 21