v5.3.0
https://github.com/sociomantic-tsunami/ocean/milestone/115
Deprecations
Module ocean.stdc.posix.sys.types
has been deprecated
ocean.stdc.posix.sys.types
This module was just publicly importing core.sys.posix.sys.types
.
Prefer this import instead.
Trivial wrappers in ocean.transition
have been deprecated
ocean.transition
The following symbols have been deprecated:
min_normal (T : real)
global(istring)
ModuleInfoPtr
They can be trivially replaced by their builtin D2 equivalent.
Deprecate D1 operator overloads in SignalSet
DMD 2.088.0 has deprecated D1 operator overloads, which are expected to
be replaced with the newer D2 op{Unary,Binary,BinaryRight,OpAssign}
templated methods: https://dlang.org/changelog/2.088.0.html#dep_d1_ops
The D1 operator overloads in SignalSet
are used in a rather weird way
which does not really seem appropriate to use for insertion and removal
from a set. Rather than replace them with D2 operator overloads, they
have simply been deprecated in favour of using the existing add
and
remove
methods directly. Support for the operator overloads will be
dropped in the next major release of ocean.
Module ocean.util.log.model.ILogger
have been moved one level up
ocean.util.log.model.ILogger
This module was the only one in its package.
Additionally, as explained in Ocean issue #573,
the package hierarchy including model
is flawed.
Module ocean.stdc.posix.stdlib
has been deprecated
ocean.stdc.posix.stdlib
This module was just publicly importing two other modules.
Most uses can be replaced with an import to core.sys.posix.stdlib
.
Users of mkstemp
, mkostemp
, or mkostemps
should import
ocean.stdc.posix.gnu.stdlib
.
Module ocean.stdc.posix.arpa.inet
has been deprecated
ocean.stdc.posix.arpa.inet
This module was just publicly importing core.sys.posix.arpa.inet
.
Prefer this import instead.
Module ocean.stdc.posix.net.if_
has been deprecated
ocean.stdc.posix.net.if_
This module was just publicly importing core.sys.posix.net.if_
.
Prefer this import instead.
Fix -=
operator implementation in SuspendableThrottlerCount
ocean.io.model.SuspendableThrottlerCount
The -=
operator overload (D1 opSubAssign
) was inexplicably aliased
to the add
method rather than the correct remove
. This probably
means that no one was ever actually using the operator overload, but it
seems a good idea to fix it in any case.
Replace D1 operator overloads with D2 operator overloads
ocean.io.model.SuspendableThrottlerCount
ocean.math.Distribution
ocean.math.SlidingAverage
ocean.math.WideUInt
ocean.time.Time
DMD 2.088.0 has deprecated D1 operator overloads, which are expected to
be replaced with the newer D2 op{Unary,Binary,BinaryRight,OpAssign}
templated methods: https://dlang.org/changelog/2.088.0.html#dep_d1_ops
Since templated methods cannot be overridden this may in some rare cases
cause breaking change for classes that implemented the old operators.
In general however this will likely make no practical difference, other
than the absence of scores of deprecation messages with more recent DMD
versions.
Deprecated the init
method in BitArray
and introduced initialize
ocean.core.BitArray
The BitArray
struct has an init
method which was used for initializing
with a set of parameters. However, this makes BitArray.init
unusable in
some contexts in generic code, as it would trigger compiler errors.
The new initialize
method should be used instead.
Function ocean.text.Util : layout
has been deprecated
ocean.text.Util
This function was duplicating the functionality of Formatter
.
Additionally, the speed advantage does not apply anymore,
as the overhead of the old Tango Layout
was due to the usage of TypeInfo
,
and performances should be equivalent nowadays.
Lastly, most usage in Ocean were to format temporaries into buffer,
and later pass them to a delegate,
something that can be done without temporary using sformat
.
Features
Add snakeToPascal string case conversion function
ocean.meta.codegen.CTFE
The new 'snakeToPascal' function converts a snake_case name to a PascalCase.
But it's not memory friendly and you should use only at CTFE.
Logger.runtime()
now uses Clock.startTime()
ocean.util.log.Logger
The Logger
now uses Clock.startTime()
instead of the hierarchy instantiation time.
This means that all hierarchy will have the same runtime
.
In practice, programs only ever had one hierarchy,
and since the common usage is to instantiate Logger
s from the module constructor,
the runtime()
was almost always that of the program, save for a few milliseconds.