Re: D's SwitchStatement accepts statements with ridiculous semantics

2017-09-30 Thread Jacob Carlborg via Digitalmars-d
On 2017-09-29 21:56, Timon Gehr wrote: Well, I have used the switch(...) with(...) idiom you mentioned in the original post a few times, and I'm quite confident you'd meet some opposition if you were to break it. I've used that as well, but the other way around. I put the switch statement ins

Re: Alternatives to pointers?

2017-09-30 Thread Timon Gehr via Digitalmars-d
On 29.09.2017 03:51, Jerry wrote: I miss ref variables, for the simple fact that using the square brackets with a ref variable doesn't access the pointer. Don't know how many times I've accidentially used a pointer as an array. Not very easy to catch especially if the object has pointers to oth

Re: D's SwitchStatement accepts statements with ridiculous semantics

2017-09-30 Thread drug via Digitalmars-d
30.09.2017 05:35, sarn пишет: For anyone who's wondering, it works because switch is just a computed goto. The code's equivalent to this: import std.stdio; void main() { int i = 0; // switch(i) if (i == 7) { goto case_7; } else { goto ca

Re: D's SwitchStatement accepts statements with ridiculous semantics

2017-09-30 Thread user1234 via Digitalmars-d
On Friday, 29 September 2017 at 09:12:54 UTC, Don Clugston wrote: Or it may have just been an accident. But regardless of the original motivation, it allows some truly dreadful semantics. Can we disallow this silliness please? There are two big family of switches. C-like and Pascal like. In

DIP88 Named Parameters, Status?

2017-09-30 Thread Jonathan Marler via Digitalmars-d
https://wiki.dlang.org/DIP88 I'd like to see DIP88 (Named Parameters) revived. Was this proposal rejected or is it just stale and needs a refresh? Named parameters can be implemented in a library, however, in my opinion they are useful enough to warrant a clean syntax with language support.

Re: DIP88 Named Parameters, Status?

2017-09-30 Thread Jonathan M Davis via Digitalmars-d
On Saturday, September 30, 2017 16:10:44 Jonathan Marler via Digitalmars-d wrote: > https://wiki.dlang.org/DIP88 > > I'd like to see DIP88 (Named Parameters) revived. Was this > proposal rejected or is it just stale and needs a refresh? Named > parameters can be implemented in a library, however

Re: DIP88 Named Parameters, Status?

2017-09-30 Thread solidstate1991 via Digitalmars-d
On Saturday, 30 September 2017 at 16:22:37 UTC, Jonathan M Davis wrote: Effectively, all DIPs from that wiki that have not already been accepted are dead, regardless of whether they stand any chance of acceptance. For any DIP to be accepted, it will have to go through the new DIP process, whi

DMD 2.076.0 fails to build a project with dlangui as dependency

2017-09-30 Thread solidstate1991 via Digitalmars-d
When I try to build a Hello World app for dlangui under VS2017, I get this error: -- Build started: Project: dlangidefirstrun, Configuration: Debug Win32 -- Building Win32\Debug\dlanguifirstrun.exe... object.Error@(0): Access Violation 0x005BEDEE 0x005D7FD6 0x005A38D0

Re: Alternatives to pointers?

2017-09-30 Thread Jerry via Digitalmars-d
On Saturday, 30 September 2017 at 04:15:52 UTC, bitwise wrote: On Friday, 29 September 2017 at 01:51:36 UTC, Jerry wrote: [...] Maybe this? ref auto at(T : U[], U)(T arr, size_t index) { return arr[index]; } int main(string[] argv) { int* a = new int(1); int[] b = [1]; int[1]

Re: Alternatives to pointers?

2017-09-30 Thread Jerry via Digitalmars-d
On Saturday, 30 September 2017 at 08:27:26 UTC, Timon Gehr wrote: On 29.09.2017 03:51, Jerry wrote: I miss ref variables, for the simple fact that using the square brackets with a ref variable doesn't access the pointer. Don't know how many times I've accidentially used a pointer as an array.

Re: I need runtime reflection

2017-09-30 Thread bitwise via Digitalmars-d
On Friday, 29 September 2017 at 16:40:38 UTC, Gheorghe Gabriel wrote: [...] Still work to do, but usable. https://github.com/nicolasjinchereau/d-reflection

Re: Should we add `a * b` for vectors?

2017-09-30 Thread Walter Bright via Digitalmars-d
On 9/29/2017 7:17 PM, Manu wrote: Whether you like it or not, the lack of ADL will make the idea of operator overloading a disaster. Please present an example.

Re: Should we add `a * b` for vectors?

2017-09-30 Thread Walter Bright via Digitalmars-d
On 9/28/2017 7:42 AM, Wyatt wrote: Any sufficiently advanced bug is indistinguishable from a feature! ;) D has other ways of doing what ADL does, so I am curious for an example from Manu about why it doesn't work.

Re: DIP88 Named Parameters, Status?

2017-09-30 Thread Jonathan M Davis via Digitalmars-d
On Saturday, September 30, 2017 16:57:09 solidstate1991 via Digitalmars-d wrote: > On Saturday, 30 September 2017 at 16:22:37 UTC, Jonathan M Davis > > wrote: > > Effectively, all DIPs from that wiki that have not already been > > accepted are dead, regardless of whether they stand any chance > >

Re: DMD 2.076.0 fails to build a project with dlangui as dependency

2017-09-30 Thread Jonathan M Davis via Digitalmars-d
On Saturday, September 30, 2017 17:04:45 solidstate1991 via Digitalmars-d wrote: > When I try to build a Hello World app for dlangui under VS2017, I > get this error: > > -- Build started: Project: dlangidefirstrun, Configuration: > Debug Win32 -- > Building Win32\Debug\dlanguifirstrun.exe

Re: DIP88 Named Parameters, Status?

2017-09-30 Thread Nicholas Wilson via Digitalmars-d
On Saturday, 30 September 2017 at 16:57:09 UTC, solidstate1991 wrote: On Saturday, 30 September 2017 at 16:22:37 UTC, Jonathan M Davis wrote: Effectively, all DIPs from that wiki that have not already been accepted are dead, regardless of whether they stand any chance of acceptance. For any D

Re: DIP88 Named Parameters, Status?

2017-09-30 Thread Jonathan Marler via Digitalmars-d
On Saturday, 30 September 2017 at 22:37:31 UTC, Jonathan M Davis wrote: On Saturday, September 30, 2017 16:57:09 solidstate1991 via Digitalmars-d wrote: On Saturday, 30 September 2017 at 16:22:37 UTC, Jonathan M Davis wrote: > [...] What about DIP45, or making export an attribute? That would

Re: DIP88 Named Parameters, Status?

2017-09-30 Thread Jonathan M Davis via Digitalmars-d
On Sunday, October 01, 2017 01:54:24 Jonathan Marler via Digitalmars-d wrote: > Hoping that someone will chime in and answer the original > question. It's likely that only Walter or Andrei can answer it. > > Is it a waste of time for me to put effort into renewing this > DIP? Is it dead on arriv