On 2/29/20 11:38 AM, JN wrote:
> assert(1 in [1, 2, 3]);
Because you mentioned canFind, I think you want the semantics to be "is
there an element with this value." If so, it would be confusing to use
the same operator for two different things: For associative arrays, it
means "is there an
On 2/29/20 2:38 PM, JN wrote:
assert(1 in [1, 2, 3]);
Error: incompatible types for (1) in ([1, 2, 3]): int and int[
Yes, I know about .canFind(), but this is something that trips people
over and over.
I think it would be better if "in" worked for both assoc arrays and
normal arrays, or
On 2/28/20 1:34 PM, cc wrote:
This compiles:
class Foo {
int x;
@(1) void y() {}
this() {
static foreach (idx, field; getSymbolsByUDA!(Foo, 1)) {
}
}
}
This does not:
class Foo {
@(1) int x;
void y() {}
this() {
static foreach
assert(1 in [1, 2, 3]);
Error: incompatible types for (1) in ([1, 2, 3]): int and int[
Yes, I know about .canFind(), but this is something that trips
people over and over.
I think it would be better if "in" worked for both assoc arrays
and normal arrays, or didn't work at all, for added
On Saturday, 29 February 2020 at 07:35:10 UTC, Boris Carvajal
wrote:
On Saturday, 29 February 2020 at 03:53:37 UTC, David Anderson
wrote:
I want to capture that text in a variable, but the upload
function returns void. How can I get the text returned by the
web server to be stored in a
On Friday, 28 February 2020 at 16:51:10 UTC, AB wrote:
On Thursday, 27 February 2020 at 14:15:26 UTC, p.shkadzko wrote:
[...]
Your Example with a minimal 2D array.
module test2;
import std.random : Xorshift, unpredictableSeed, uniform;
import std.range : generate, take, chunks;
On Thursday, 27 February 2020 at 11:29:01 UTC, Greatsam4aure
wrote:
I have install Vs 2019 and install the C++ package together
with Visual-D bundle with DMD and LDC. But by project refuse to
run
[...]
user32.lib - this file in C:\D\dmd2\windows ( on my PC, on you it
other )
LINK : fatal
On Friday, 28 February 2020 at 12:21:41 UTC, Simen Kjærås wrote:
On Friday, 28 February 2020 at 10:33:11 UTC, Виталий Фадеев
wrote:
Thanks all !
I happy !
Check this one:
void On( T, M )( T o, M message )
{
[snip]
void main()
{
auto a = new A();
a.Send( a,
On Saturday, 29 February 2020 at 13:40:11 UTC, Adnan wrote:
On Saturday, 29 February 2020 at 13:03:21 UTC, Sebastiaan Koppe
wrote:
On Saturday, 29 February 2020 at 12:50:59 UTC, Adnan wrote:
* Option!T from the optional package: Has even worse problem
IMO. Not only it allows None + int but
On Saturday, 29 February 2020 at 13:40:11 UTC, Adnan wrote:
On Saturday, 29 February 2020 at 13:03:21 UTC, Sebastiaan Koppe
wrote:
On Saturday, 29 February 2020 at 12:50:59 UTC, Adnan wrote:
* Option!T from the optional package: Has even worse problem
IMO. Not only it allows None + int but
On Saturday, 29 February 2020 at 12:50:59 UTC, Adnan wrote:
I have a struct that has to arrays. Each of those must have the
same sizes.
So while constructing the array, if you pass two arrays of
different sizes the constructor must return nothing.
In Rust I could easily use Option. D has no
On Saturday, 29 February 2020 at 13:03:21 UTC, Sebastiaan Koppe
wrote:
On Saturday, 29 February 2020 at 12:50:59 UTC, Adnan wrote:
* Option!T from the optional package: Has even worse problem
IMO. Not only it allows None + int but also it returns a `[]`.
This API is not to my liking. You could
On Saturday, 29 February 2020 at 12:50:59 UTC, Adnan wrote:
* Option!T from the optional package: Has even worse problem
IMO. Not only it allows None + int but also it returns a `[]`.
This API is not to my liking. You could say well Haskell has
fmap for Optional etc, and I am aware of that, so
I have a struct that has to arrays. Each of those must have the
same sizes.
So while constructing the array, if you pass two arrays of
different sizes the constructor must return nothing.
In Rust I could easily use Option. D has no answer to Optional
types as far as I am concerned. Is
14 matches
Mail list logo