On Monday, 30 May 2016 at 21:32:46 UTC, Alex Parrill wrote:
On Monday, 30 May 2016 at 10:09:19 UTC, chmike wrote:
Why can't info() return a Rebindable!(immutable(InfoImpl)) ?
What do you mean? `info` returns an `immutable(InfoImpl)`, not
a `Rebindable!(immutable(InfoImpl))`. Rebindable
Here's one more vote for extending UFCS to operator overloading.
Elie wrote that it's "a restriction that seems pointless and
arbitrary"... which summarizes my own thoughts rather well, too.
There are certainly concerning scenarios that can arise from
making this change, but the correct way
On Monday, 30 May 2016 at 16:22:26 UTC, Max Samukha wrote:
From the spec (https://dlang.org/spec/function.html#nested):
"Nested functions cannot be overloaded."
Anybody knows what's the rationale?
I'm guessing it's related to -
Unlike module level declarations, declarations within function
On Friday, 27 May 2016 at 15:49:16 UTC, ArturG wrote:
On Friday, 27 May 2016 at 15:24:18 UTC, Adam D. Ruppe wrote:
On Friday, 27 May 2016 at 15:19:50 UTC, ArturG wrote:
yes but i have to check for that when some one does
Why? This is no different than if they set any of the other
four
On Monday, 30 May 2016 at 10:09:19 UTC, chmike wrote:
This code compile, but array appending doesn't work
alias Rebindable!(immutable(InfoImpl)) Info;
class InfoImpl
{
void foo() {}
static immutable(InfoImpl) info()
{
__gshared immutable InfoImpl x = new immutable
On Sunday, 29 May 2016 at 11:03:36 UTC, Russel Winder wrote:
Is there even a wxD?
Or perhaps there is an alternative that fits the bill of being
production ready now, and either gives the same UI across all
platforms or provides a platform UI with no change of source
code, just a
On Friday, 27 May 2016 at 14:48:59 UTC, Adam D. Ruppe wrote:
On Friday, 27 May 2016 at 14:43:47 UTC, ArturG wrote:
if(value is typeof(value).init) ...
that still requiers a special case for floating points, arrays
and optionally empty string literals.
Have you tried? That should work
I didn't check assembly for '=='. What I have seen is that struct
comparison in dmd is implemented as byte per byte compare even if the
struct is 64bit long (e.g. Rebindable). I suppose dmd uses this
strategy because struct/array may not be 64bit aligned, or they could
have different
From the spec (https://dlang.org/spec/function.html#nested):
"Nested functions cannot be overloaded."
Anybody knows what's the rationale?
On Sunday, 29 May 2016 at 07:18:10 UTC, Jonathan M Davis wrote:
On Friday, May 27, 2016 09:08:20 Marc Schütz via
Digitalmars-d-learn wrote:
On Thursday, 26 May 2016 at 06:23:17 UTC, Jonathan M Davis
wrote:
> The difference is that it's impossible to do
> 10.opBinary!"+"(15), so if you're
On Monday, 30 May 2016 at 09:28:29 UTC, ag0aep6g wrote:
On 05/29/2016 10:40 PM, qznc wrote:
bool string_cmp_opt(immutable(ubyte)[] x, immutable(ubyte)[]
y) {
Having "string" in the function name may be a bit misleading.
This doesn't have any special functionality for
On Sunday, 29 May 2016 at 16:26:58 UTC, Seb wrote:
On Sunday, 29 May 2016 at 11:05:21 UTC, Gary Willoughby wrote:
I'm currently implementing a hash map as an exercise and
wondered if there is a built-in function I could use to hash
keys effectively? What I'm looking for is a function that
This code compile, but array appending doesn't work
alias Rebindable!(immutable(InfoImpl)) Info;
class InfoImpl
{
void foo() {}
static immutable(InfoImpl) info()
{
__gshared immutable InfoImpl x = new immutable InfoImpl;
return x;
}
}
void main()
{
On 05/29/2016 10:40 PM, qznc wrote:
bool string_cmp_opt(immutable(ubyte)[] x, immutable(ubyte)[] y) {
Having "string" in the function name may be a bit misleading. This
doesn't have any special functionality for text/characters/Unicode, does it?
Should have const parameters, not immutable.
Oops, the duplicate alias instruction and main are copy past
error. It looks like the code was already too complex for me. ;)
Here is the code I tested
import std.typecons;
Rebindable!(immutable TestImpl) Test;
class TestImpl
{
void foo() {}
Test test() { __gshared x = new
Hello,
here is a program stripped down to the minimum code that doesn't
compile
import std.typecons;
Rebindable!(immutable TestImpl) Test;
Rebindable!(immutable TestImpl) Test;
class TestImpl
{
void foo() {}
Test test() { __gshared x = new immutable TestImpl; return
On Monday, 30 May 2016 at 05:54:42 UTC, Nicholas Wilson wrote:
Is it legal/possible to overload the unary * operator? Also is
it legal/possible to individually overload the comparison
operators and not return a bool?
Yes to unary * (see [1]). No to the rest. Comparisons are always
lowered to
17 matches
Mail list logo