Re: Note from a donor

2017-10-31 Thread Dmitry Olshansky via Digitalmars-d
On Tuesday, 31 October 2017 at 21:21:46 UTC, Adam D. Ruppe wrote: On Tuesday, 31 October 2017 at 06:33:02 UTC, Dmitry Olshansky wrote: I can live without hot water in my house, would I? So sad but true... my water heater went down today :( Ouch, that analogy got out of hand quick) Basement

Re: Note from a donor

2017-10-31 Thread Dmitry Olshansky via Digitalmars-d
On Wednesday, 1 November 2017 at 03:55:14 UTC, Jonathan M Davis wrote: On Tuesday, October 31, 2017 06:33:02 Dmitry Olshansky via Digitalmars-d wrote: On Tuesday, 31 October 2017 at 01:25:31 UTC, Adam D Ruppe wrote: > A 32 bit program can do most the same stuff. Client applications probably

Re: Note from a donor

2017-10-31 Thread codephantom via Digitalmars-d
On Wednesday, 1 November 2017 at 03:55:14 UTC, Jonathan M Davis wrote: I think that Adam has a valid point that there _are_ plenty of applications that can function just fine as 32-bit, and given how much easier it is to build for 32-bit on Windows with D, if you don't need to interact with

Re: Proposal: Support for objects in switch statements

2017-10-31 Thread Yuxuan Shui via Digitalmars-d
On Wednesday, 1 November 2017 at 01:16:32 UTC, solidstate1991 wrote: After I started to alter my graphics engine to use the multiple kinds of bitmaps (now using multiple language features, like templates and aliases) on one layer, I noticed that type detection of bitmap objects would be easier

Re: Note from a donor

2017-10-31 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, October 31, 2017 06:33:02 Dmitry Olshansky via Digitalmars-d wrote: > On Tuesday, 31 October 2017 at 01:25:31 UTC, Adam D Ruppe wrote: > > A 32 bit program can do most the same stuff. > > Client applications probably do not care much. Servers and > cluster software can use more RAM

Re: Required Reading: "How Non-Member Functions Improve Encapsulation"

2017-10-31 Thread codephantom via Digitalmars-d
On Tuesday, 31 October 2017 at 15:45:42 UTC, H. S. Teoh wrote: The one case where the difference matters is when you're trying to debug something. In that case, I'd say the onus is really upon the debugger to tell you what kind of function it was. Yes, this is my main concern I guess, as I

Re: Note from a donor

2017-10-31 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 1 November 2017 at 01:48:13 UTC, codephantom wrote: Anyway...when you going to give us another surmon? This is WAY off topic so i'ma just leave it at this post (you can email me if you want to go further) but I kinda doubt I'll go to a DConf in Berlin. It is a pain for me.

Re: [OT] Windows dying

2017-10-31 Thread codephantom via Digitalmars-d
On Monday, 30 October 2017 at 13:32:23 UTC, Joakim wrote: I don't know how intense your data analysis is, but I replaced a Win7 ultrabook that had a dual-core i5 and 4 GBs of RAM with an Android tablet that has a quad-core ARMv7 and 3 GBs of RAM as my daily driver a couple years ago, without

Re: Note from a donor

2017-10-31 Thread codephantom via Digitalmars-d
On Tuesday, 31 October 2017 at 21:21:46 UTC, Adam D. Ruppe wrote: But my point is that the kind of typical hobby stuff and a huge (HUGE) subset of other work too functions perfectly well with 32 bit, yes, even with optlink. You can do web applications, desktop applications, games, all kinds of

Proposal: Support for objects in switch statements

2017-10-31 Thread solidstate1991 via Digitalmars-d
After I started to alter my graphics engine to use the multiple kinds of bitmaps (now using multiple language features, like templates and aliases) on one layer, I noticed that type detection of bitmap objects would be easier and better readable, if instead of: if(bitmapObject.classinfo ==

Re: [OT] Windows dying

2017-10-31 Thread Tony via Digitalmars-d
On Monday, 30 October 2017 at 13:32:23 UTC, Joakim wrote: There will always be a few Windows cockroaches that survive the mobile nuclear blast, but we're talking about the majority who won't. Why do predictions about the future matter when at the present Windows dominates the desktop

Re: [OT] Windows dying

2017-10-31 Thread Mengu via Digitalmars-d
On Monday, 30 October 2017 at 13:32:23 UTC, Joakim wrote: I don't know how intense your data analysis is, but I replaced a Win7 ultrabook that had a dual-core i5 and 4 GBs of RAM with an Android tablet that has a quad-core ARMv7 and 3 GBs of RAM as my daily driver a couple years ago, without

Re: Note from a donor

2017-10-31 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 31 October 2017 at 06:33:02 UTC, Dmitry Olshansky wrote: I can live without hot water in my house, would I? So sad but true... my water heater went down today :( Basement flooded and it is blinking out a bad vapor sensor error code. Client applications probably do not care much.

Re: Note from a donor

2017-10-31 Thread Andrei Alexandrescu via Digitalmars-d
On 10/30/2017 09:25 PM, Adam D Ruppe wrote: There are advantages to 64 bit, but you can live without them. A 32 bit program can do most the same stuff. The differences in performance are large and growing, however. -- Andrei

Re: Is this actually a bug or?

2017-10-31 Thread bauss via Digitalmars-d
On Tuesday, 31 October 2017 at 20:20:38 UTC, Jonathan M Davis wrote: On Tuesday, October 31, 2017 20:06:12 bauss via Digitalmars-d wrote: If you look at: https://github.com/DiamondMVC/Diamond/blob/master/authentication/permissio ns.d#L13 I have to import "diamond.http.method" manually,

Re: "version" private word

2017-10-31 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, October 31, 2017 20:36:57 Jacob Carlborg via Digitalmars-d-learn wrote: > On 2017-10-31 16:36, Dr. Assembly wrote: > > thanks. I just find it werid, maybe because I came from C/C++ > > background, where it means only integer types. So enum s = "foo"; is > > really werid. But I'll get

Re: Is this actually a bug or?

2017-10-31 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, October 31, 2017 20:06:12 bauss via Digitalmars-d wrote: > If you look at: > https://github.com/DiamondMVC/Diamond/blob/master/authentication/permissio > ns.d#L13 > > I have to import "diamond.http.method" manually, although the > package "diamond.http" imports the module public like:

Is this actually a bug or?

2017-10-31 Thread bauss via Digitalmars-d
If you look at: https://github.com/DiamondMVC/Diamond/blob/master/authentication/permissions.d#L13 I have to import "diamond.http.method" manually, although the package "diamond.http" imports the module public like: https://github.com/DiamondMVC/Diamond/blob/master/http/package.d#L11 However

Re: "version" private word

2017-10-31 Thread bauss via Digitalmars-d-learn
On Tuesday, 31 October 2017 at 13:55:56 UTC, Igor Shirkalin wrote: On Tuesday, 31 October 2017 at 13:53:54 UTC, Jacob Carlborg wrote: On 2017-10-31 14:46, Igor Shirkalin wrote: Hello! We need some conditional compilation using 'version'. Say we have some code to be compiled for X86 and

[Issue 17957] New: D shared library throws asserts when called from C detached pthread but not terminated with dlclose

2017-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17957 Issue ID: 17957 Summary: D shared library throws asserts when called from C detached pthread but not terminated with dlclose Product: D Version: D2 Hardware: x86_64

Re: Project Elvis

2017-10-31 Thread bauss via Digitalmars-d
On Tuesday, 31 October 2017 at 08:15:24 UTC, Mark wrote: On Saturday, 28 October 2017 at 11:38:52 UTC, Andrei Alexandrescu wrote: Walter and I decided to kick-off project Elvis for adding the homonym operator to D. [...] Thanks, Andrei The Elvis operator's purpose is to make working with

Re: "version" private word

2017-10-31 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-10-31 16:36, Dr. Assembly wrote: thanks. I just find it werid, maybe because I came from C/C++ background, where it means only integer types. So enum s = "foo"; is really werid. But I'll get used to it. Think of it more like #define in C/C++ than "const". The above defines a

Re: SublimeLinter-contrib-dmd: dmd feedback as you type

2017-10-31 Thread notna via Digitalmars-d-announce
On Tuesday, 31 October 2017 at 11:30:00 UTC, Bastiaan Veelo wrote: On Tuesday, 31 October 2017 at 11:02:23 UTC, notna wrote: ImportError: No module named 'SublimeLinter' Looks like you did not install the SublimeLinter package. You need both. Thanks, seems to work now ;)

[Issue 17953] inout-like mechanism to infer function attributes from callback attributes

2017-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17953 anonymous4 changed: What|Removed |Added Hardware|Other |All

[Issue 17953] inout-like mechanism to infer function attributes from callback attributes

2017-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17953 --- Comment #1 from anonymous4 --- Apparently even templates don't help here much: --- import std.typecons:Nullable; Nullable!V convert(T,V)(Nullable!T v, scope V delegate(T) c) { if(v.isNull)return Nullable!V();

Re: Note from a donor

2017-10-31 Thread Kagamin via Digitalmars-d
On Tuesday, 31 October 2017 at 01:25:31 UTC, Adam D Ruppe wrote: That doesn't really matter. If you're IMPLEMENTING the database, sure it can help (but is still not *necessary*), but if you're just playing with it, let the database engine handle that and just query the bits you are actually

Re: Required Reading: "How Non-Member Functions Improve Encapsulation"

2017-10-31 Thread H. S. Teoh via Digitalmars-d
On Tue, Oct 31, 2017 at 08:45:11AM +, Dukc via Digitalmars-d wrote: > On Monday, 30 October 2017 at 23:03:12 UTC, H. S. Teoh wrote: > > For example, suppose you're using a proprietary library that > > provides a class X that behaves pretty closely to a range, but > > doesn't quite have a range

Re: Note from a donor

2017-10-31 Thread Kagamin via Digitalmars-d
On Monday, 30 October 2017 at 14:46:30 UTC, Adam D. Ruppe wrote: On Monday, 30 October 2017 at 10:53:33 UTC, Kagamin wrote: Because native. The processor natively supports all 32 bit code when running in 64 bit more. It just works as far as native hardware goes. For processor it's a whole

Re: SublimeLinter-contrib-dmd: dmd feedback as you type

2017-10-31 Thread Moritz Maxeiner via Digitalmars-d-announce
On Tuesday, 31 October 2017 at 16:00:25 UTC, Bastiaan Veelo wrote: [...] Out of curiosity, what other plugins from [2] do you use in Sublime Text? How are they integrating with dub? If that question is open to the general public: None, I hacked my own [1] to suit my exact needs. [1]

Re: SublimeLinter-contrib-dmd: dmd feedback as you type

2017-10-31 Thread Moritz Maxeiner via Digitalmars-d-announce
On Tuesday, 31 October 2017 at 13:32:34 UTC, SrMordred wrote: Thank you , works perfectly! One idea: Integrating with dub. So you don´t have to manually set lib dirs and flags since its all on 'dub.json' already. You can pretty much copy paste from sublide for this [1] (my own D plugin for

Re: SublimeLinter-contrib-dmd: dmd feedback as you type

2017-10-31 Thread Bastiaan Veelo via Digitalmars-d-announce
On Tuesday, 31 October 2017 at 13:32:34 UTC, SrMordred wrote: Thank you , works perfectly! One idea: Integrating with dub. So you don´t have to manually set lib dirs and flags since its all on 'dub.json' already. That would be nice. I don't have a project yet that uses dub though, so I am

Re: Required Reading: "How Non-Member Functions Improve Encapsulation"

2017-10-31 Thread H. S. Teoh via Digitalmars-d
On Tue, Oct 31, 2017 at 01:44:58AM +, codephantom via Digitalmars-d wrote: > On Monday, 30 October 2017 at 23:03:12 UTC, H. S. Teoh wrote: > > > > But in D, UFCS allows obj.func() to work for both member functions > > and free functions, so if the client code uses the obj.func() > > syntax,

Re: "version" private word

2017-10-31 Thread Igor Shirkalin via Digitalmars-d-learn
On Tuesday, 31 October 2017 at 15:19:49 UTC, Steven Schveighoffer wrote: On 10/31/17 10:47 AM, Igor Shirkalin wrote: [...] Sorry I hate writing code on mobile. You can create an arbitrary version by assigning a symbol to it, use that symbol to describe a feature, assign that symbol for

Re: SublimeLinter-contrib-dmd: dmd feedback as you type

2017-10-31 Thread Bastiaan Veelo via Digitalmars-d-announce
On Tuesday, 31 October 2017 at 13:47:26 UTC, Dmitry Olshansky wrote: Sounds cool, I assume you use -o- option to disable DMD codegen? yes Should be fairly fast. indeed

Re: "version" private word

2017-10-31 Thread Dr. Assembly via Digitalmars-d-learn
On Tuesday, 31 October 2017 at 15:20:31 UTC, Igor Shirkalin wrote: On Tuesday, 31 October 2017 at 14:54:27 UTC, Dr. Assembly wrote: On Tuesday, 31 October 2017 at 13:53:54 UTC, Jacob Carlborg wrote: On 2017-10-31 14:46, Igor Shirkalin wrote: [...] The only alternative is to do something

Re: hacky way to get explicit default constructor on struct :P

2017-10-31 Thread Steven Schveighoffer via Digitalmars-d
On 10/31/17 9:49 AM, Dmitry Olshansky wrote: On Monday, 30 October 2017 at 13:24:46 UTC, Steven Schveighoffer wrote: On 10/28/17 12:59 PM, LunaticWare wrote: Event if there is no default constructor on struct we can still make one that work as well as if it were implemented, here is my example

Re: "version" private word

2017-10-31 Thread Igor Shirkalin via Digitalmars-d-learn
On Tuesday, 31 October 2017 at 14:54:27 UTC, Dr. Assembly wrote: On Tuesday, 31 October 2017 at 13:53:54 UTC, Jacob Carlborg wrote: On 2017-10-31 14:46, Igor Shirkalin wrote: [...] The only alternative is to do something like this: version (X86) enum x86 = true; else enum x86 =

Re: "version" private word

2017-10-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/31/17 10:47 AM, Igor Shirkalin wrote: On Tuesday, 31 October 2017 at 14:31:17 UTC, Jesse Phillips wrote: On Tuesday, 31 October 2017 at 14:25:19 UTC, Igor Shirkalin wrote: On Tuesday, 31 October 2017 at 14:22:37 UTC, Jesse Phillips wrote: On Tuesday, 31 October 2017 at 13:46:40 UTC,

Re: Required Reading: "How Non-Member Functions Improve Encapsulation"

2017-10-31 Thread jmh530 via Digitalmars-d
On Monday, 30 October 2017 at 23:03:12 UTC, H. S. Teoh wrote: Yeah, the whole "private is module-private, not aggregate-private" throws a monkey wrench into the works. I can understand the logic behind module-private vs. aggregate-private, but sometimes you really *do* want

Re: "version" private word

2017-10-31 Thread Dr. Assembly via Digitalmars-d-learn
On Tuesday, 31 October 2017 at 13:53:54 UTC, Jacob Carlborg wrote: On 2017-10-31 14:46, Igor Shirkalin wrote: Hello! We need some conditional compilation using 'version'. Say we have some code to be compiled for X86 and X86_64. How can we do that using predefined (or other) versions? Examples:

Re: "version" private word

2017-10-31 Thread Igor Shirkalin via Digitalmars-d-learn
On Tuesday, 31 October 2017 at 14:31:17 UTC, Jesse Phillips wrote: On Tuesday, 31 October 2017 at 14:25:19 UTC, Igor Shirkalin wrote: On Tuesday, 31 October 2017 at 14:22:37 UTC, Jesse Phillips wrote: On Tuesday, 31 October 2017 at 13:46:40 UTC, Igor Shirkalin wrote: Hello! You goal should

[Issue 17956] core.memory unittest failure (possibly glibc 2.26 specific)

2017-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17956 Iain Buclaw changed: What|Removed |Added CC||ibuc...@gdcproject.org

Re: "version" private word

2017-10-31 Thread Jesse Phillips via Digitalmars-d-learn
On Tuesday, 31 October 2017 at 14:25:19 UTC, Igor Shirkalin wrote: On Tuesday, 31 October 2017 at 14:22:37 UTC, Jesse Phillips wrote: On Tuesday, 31 October 2017 at 13:46:40 UTC, Igor Shirkalin wrote: Hello! You goal should be to describe features. Version x86 ... Version = I can stand on

Re: "version" private word

2017-10-31 Thread Igor Shirkalin via Digitalmars-d-learn
On Tuesday, 31 October 2017 at 14:22:37 UTC, Jesse Phillips wrote: On Tuesday, 31 October 2017 at 13:46:40 UTC, Igor Shirkalin wrote: Hello! You goal should be to describe features. Version x86 ... Version = I can stand on my head ... pardon?

Re: "version" private word

2017-10-31 Thread Jesse Phillips via Digitalmars-d-learn
On Tuesday, 31 October 2017 at 13:46:40 UTC, Igor Shirkalin wrote: Hello! You goal should be to describe features. Version x86 ... Version = I can stand on my head ...

[Issue 17954] init member should be disallowed

2017-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17954 --- Comment #4 from Steven Schveighoffer --- That is exactly how I would describe "not much benefit". One less keyword that almost nobody is asking to have removed. I haven't seen much of a demand for using "init" anywhere

Re: "version" private word

2017-10-31 Thread Igor Shirkalin via Digitalmars-d-learn
On Tuesday, 31 October 2017 at 13:53:54 UTC, Jacob Carlborg wrote: On 2017-10-31 14:46, Igor Shirkalin wrote: Hello! We need some conditional compilation using 'version'. Say we have some code to be compiled for X86 and X86_64. How can we do that using predefined (or other) versions? Examples:

[Issue 17954] init member should be disallowed

2017-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17954 --- Comment #3 from Jacob Carlborg --- The benefit would be less reserved words. I think it was a design mistake from the beginning. Instead of fixing that we're now enforcing what was not really enforced before. --

[Issue 17956] New: core.memory unittest failure (possibly glibc 2.26 specific)

2017-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17956 Issue ID: 17956 Summary: core.memory unittest failure (possibly glibc 2.26 specific) Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW

Re: "version" private word

2017-10-31 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-10-31 14:46, Igor Shirkalin wrote: Hello! We need some conditional compilation using 'version'. Say we have some code to be compiled for X86 and X86_64. How can we do that using predefined (or other) versions? Examples:    version(X86 || X86_64) // failed    version(X86) ||

Re: hacky way to get explicit default constructor on struct :P

2017-10-31 Thread Dmitry Olshansky via Digitalmars-d
On Monday, 30 October 2017 at 13:24:46 UTC, Steven Schveighoffer wrote: On 10/28/17 12:59 PM, LunaticWare wrote: Event if there is no default constructor on struct we can still make one that work as well as if it were implemented, here is my example n__n -- You won't ever get the same

"version" private word

2017-10-31 Thread Igor Shirkalin via Digitalmars-d-learn
Hello! We need some conditional compilation using 'version'. Say we have some code to be compiled for X86 and X86_64. How can we do that using predefined (or other) versions? Examples: version(X86 || X86_64) // failed version(X86) || version(X86_64) // failed The following works but it

Re: SublimeLinter-contrib-dmd: dmd feedback as you type

2017-10-31 Thread SrMordred via Digitalmars-d-announce
Thank you , works perfectly! One idea: Integrating with dub. So you don´t have to manually set lib dirs and flags since its all on 'dub.json' already.

[Issue 17954] init member should be disallowed

2017-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17954 --- Comment #2 from Steven Schveighoffer --- We are not adding anything. init already is a pseudo-keyword by convention, and is used everywhere. Moving to a __traits addition would be costly (so much code already uses T.init),

[Issue 16649] Header gen skips parens

2017-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16649 RazvanN changed: What|Removed |Added CC|

Re: Line numbers in backtraces (2017)

2017-10-31 Thread Moritz Maxeiner via Digitalmars-d-learn
On Tuesday, 31 October 2017 at 11:04:57 UTC, Tobias Pankrath wrote: [...] ??:? pure @safe void std.exception.bailOut!(Exception).bailOut(immutable(char)[], ulong, const(char[])) [0xab5c9566] ??:? pure @safe bool std.exception.enforce!(Exception, bool).enforce(bool, lazy const(char)[],

Re: SublimeLinter-contrib-dmd: dmd feedback as you type

2017-10-31 Thread notna via Digitalmars-d-announce
On Monday, 30 October 2017 at 22:22:42 UTC, Bastiaan Veelo wrote: SublimeLinter-contrib-dmd [1] is a plug-in for the Sublime Text 3 editor [2]. Unlike linters that are based on DScanner, it actually invokes dmd on the file that is being edited, as you edit. If dmd finds anything to complain

Line numbers in backtraces (2017)

2017-10-31 Thread Tobias Pankrath via Digitalmars-d-learn
Hi, I'm using ArchLinux and the recent DMD from the Arch repositories and my backtraces show no line numbers. I now that is an old issue, but I'm back to D after a long pause and I thought that this used to work out of the box. My backtraces look likes this: ??:? pure @safe void

[Issue 17607] not an associative array initializer

2017-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17607 --- Comment #2 from Andre --- (In reply to John Colvin from comment #1) > Another simpler case of this: > > struct S > { > //Error: not an associative array initializer > D a = ["fdsa": ["fdsafd": "fdsfa"]]; > > // OK

[Issue 17607] not an associative array initializer

2017-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17607 --- Comment #3 from John Colvin --- My use case involves structures with these initialisers being used by people who aren't really D programmers, so it looks bad and is confusing to have the extra `( ... )` for me

Re: using .init reliably

2017-10-31 Thread Alex via Digitalmars-d-learn
On Tuesday, 31 October 2017 at 02:24:48 UTC, Steven Schveighoffer wrote: Yeah... my problem is, that I don't know it at compile time. You know it at language time :) :) The .init property is provided by the compiler, unless you define it. It means the default value of the type. Here, I'm

[Issue 17955] New: compiler segfault in DsymbolSemanticVisitor::visit(UnittestDeclaration*)

2017-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17955 Issue ID: 17955 Summary: compiler segfault in DsymbolSemanticVisitor::visit(UnittestDeclaration*) Product: D Version: D2 Hardware: All OS: All

Re: Required Reading: "How Non-Member Functions Improve Encapsulation"

2017-10-31 Thread Dave Jones via Digitalmars-d
On Tuesday, 31 October 2017 at 01:44:58 UTC, codephantom wrote: On Monday, 30 October 2017 at 23:03:12 UTC, H. S. Teoh wrote: But in D, UFCS allows obj.func() to work for both member functions and free functions, so if the client code uses the obj.func() syntax, it won't have to care about

Re: Required Reading: "How Non-Member Functions Improve Encapsulation"

2017-10-31 Thread codephantom via Digitalmars-d
On Thursday, 26 October 2017 at 23:29:24 UTC, Walter Bright wrote: You can also do things like: --- s.d --- struct S { int x; ref int X() { return x; } } --- splus.d public import s; int increment(S s) { s.X() += 1; } // note no access to S.x --- user.d import splus; void

Re: Required Reading: "How Non-Member Functions Improve Encapsulation"

2017-10-31 Thread Dukc via Digitalmars-d
On Monday, 30 October 2017 at 23:03:12 UTC, H. S. Teoh wrote: For example, suppose you're using a proprietary library that provides a class X that behaves pretty closely to a range, but doesn't quite have a range API. (Or any other API, really.) Well, that's not a problem, you just write

[Issue 16648] Header generation skips postblit

2017-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16648 RazvanN changed: What|Removed |Added Status|NEW |RESOLVED

Re: Project Elvis

2017-10-31 Thread Mark via Digitalmars-d
On Saturday, 28 October 2017 at 11:38:52 UTC, Andrei Alexandrescu wrote: Walter and I decided to kick-off project Elvis for adding the homonym operator to D. [...] Thanks, Andrei The Elvis operator's purpose is to make working with null easier, but isn't null "The Billion Dollar Mistake"?

Re: Removing some of the elements from vibe.core.concurrency.Future[] futurelist

2017-10-31 Thread kerdemdemir via Digitalmars-d-learn
I'd take a look at why the error message says `Future!(UserData)[]) to Future!(AnalyzeData)[]` is AnalyzeData the type returned by ProcessResponceData? Alternatively you could use a singly linked list and splice out elements that pass the filter predicate. I think you'd have to roll your own

[Issue 17954] init member should be disallowed

2017-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17954 Jacob Carlborg changed: What|Removed |Added CC||d...@me.com --- Comment #1

Re: Note from a donor

2017-10-31 Thread Dmitry Olshansky via Digitalmars-d
On Tuesday, 31 October 2017 at 01:25:31 UTC, Adam D Ruppe wrote: On Tuesday, 31 October 2017 at 01:00:29 UTC, codephantom wrote: If you play with large databases, containing a lot data, then 64-bit memory addressing will give you access to more memory. That doesn't really matter. If you're

Re: Required Reading: "How Non-Member Functions Improve Encapsulation"

2017-10-31 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 31 October 2017 at 01:47:39 UTC, Steven Schveighoffer wrote: On 10/30/17 9:44 PM, codephantom wrote: On Monday, 30 October 2017 at 23:03:12 UTC, H. S. Teoh wrote: But in D, UFCS allows obj.func() to work for both member functions and free functions, so if the client code uses the

Re: if (int bar = .. bug or some thing

2017-10-31 Thread codephantom via Digitalmars-d-learn
On Tuesday, 31 October 2017 at 04:27:27 UTC, Joel wrote: Ok, thanks guys. why not throw in some UFCS too...just because you can ;-) import std.stdio; void main() { int foo; if (foo.bar != 0) // would be nice if I could do: (int foo.bar != 0) { throw new