Re: Implicit cast to immutable

2011-10-17 Thread Daniel Murphy
"Steven Schveighoffer" wrote in message news:op.v3h06olweav7ka@localhost.localdomain... > > That sounds like an incorrect restriction. The implicit cast to immutable > should depend on whether the function being *called* qualifies, not if the > function you are calling *from* qualifies. > I t

Re: d2 file input performance

2011-10-17 Thread Marco Leise
Am 04.09.2011, 19:01 Uhr, schrieb Christian Köstlin : On 9/3/11 7:53 , dennis luehring wrote: Am 26.08.2011 19:43, schrieb Christian Köstlin: Hi guys, i started the thread: http://stackoverflow.com/questions/7202710/fastest-way-of-reading-bytes-in-d2 on stackoverflow, because i ran into k

Looking for documentation of D's lower-level aspects.

2011-10-17 Thread Sean Silva
I have just finished reading Alexandrescu's The D Programming Language, but it doesn't seem to talk at all about how to use D as a stand-in for C/C++ almost at all. E.g., the part of D that doesn't depend on a runtime or garbage collector. It's not that I have anything against those niceties---it

Re: An old topic (pun intended)

2011-10-17 Thread Ali Çehreli
On Sun, 16 Oct 2011 19:09:46 +0200, Timon Gehr wrote: > On 10/13/2011 07:14 PM, Ali Çehreli wrote: >> On Thu, 13 Oct 2011 09:18:46 -0700, Jonathan M Davis wrote: >>> IIRC, old was rejected because it added extra complication for little >>> value. >> >> Yes, there were technical difficulties in mak

Re: FastCGI binding or implementation?

2011-10-17 Thread Jacob Carlborg
On 2011-10-17 16:01, Andrea Fontana wrote: I handle request on different threads. I do some pre-processing on scgi data and I fill a struct: request.get[] request.post[] request.cookie[] request.headers[string] then I call a virtual function (to override on subclasses) like: do(request, output

Re: overload of array operations

2011-10-17 Thread bearophile
Timon Gehr: > I agree. It is odd that we have opSliceUnary but not opSliceBinary. If you think something useful is missing, then file a Bugzilla enhancement request. Bye, bearophile

Re: overload of array operations

2011-10-17 Thread Timon Gehr
On 10/15/2011 01:12 AM, Jay Norwood wrote: Jonathan M Davis Wrote: On Friday, October 14, 2011 15:29:17 Jay Norwood wrote: Jonathan M Davis Wrote: On Friday, October 14, 2011 11:30:25 Jay Norwood wrote: Is it possible to overload array operations Please be more specific. Are you asking whe

Re: overload of array operations

2011-10-17 Thread Timon Gehr
On 10/14/2011 09:43 PM, Jonathan M Davis wrote: On Friday, October 14, 2011 15:29:17 Jay Norwood wrote: Jonathan M Davis Wrote: On Friday, October 14, 2011 11:30:25 Jay Norwood wrote: Is it possible to overload array operations Please be more specific. Are you asking whether a struct or clas

Re: An old topic (pun intended)

2011-10-17 Thread Timon Gehr
On 10/17/2011 08:04 AM, Jonathan M Davis wrote: On Monday, October 17, 2011 00:29:30 Timon Gehr wrote: On 10/16/2011 07:31 PM, Jonathan M Davis wrote: On Sunday, October 16, 2011 19:13:09 Timon Gehr wrote: I don't agree that 'old' is very difficult to implement. Just evaluate what is inside th

Re: An old topic (pun intended)

2011-10-17 Thread Alex Rønne Petersen
On 17-10-2011 07:59, Davidson Corry wrote: On 10/16/2011 9:35 PM, Alex Rønne Petersen wrote: On 17-10-2011 02:43, bearophile wrote: Timon Gehr: Eiffel does not do that either. (even though it _does_ have a built in deep copy feature) We don't have to over-engineer the feature, if somebody ne

Re: operator "~" does not check type?

2011-10-17 Thread Steven Schveighoffer
On Sun, 16 Oct 2011 18:24:26 -0400, Timon Gehr wrote: On 10/13/2011 01:46 PM, Steven Schveighoffer wrote: On Thu, 13 Oct 2011 06:57:09 -0400, Cheng Wei wrote: == Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article On Wed, 12 Oct 2011 09:46:57 -0400, Trass3r wrote: >> I belie

Re: FastCGI binding or implementation?

2011-10-17 Thread Andrea Fontana
I handle request on different threads. I do some pre-processing on scgi data and I fill a struct: request.get[] request.post[] request.cookie[] request.headers[string] then I call a virtual function (to override on subclasses) like: do(request, output); where user fill output struct in a way li

Re: Implicit cast to immutable

2011-10-17 Thread Steven Schveighoffer
On Sat, 15 Oct 2011 23:05:43 -0400, Daniel Murphy wrote: The implicit conversion to immutable is only possible inside strongly pure functions. When the parameter is 'in int[]' foo cannot be strongly pure, only const pure. As 'in int[2]' is a value type, the second foo can be strongly pure

Re: scope struct?

2011-10-17 Thread deadalnix
Nice trick ! However, in D, you have scope(exit) scope(success) and scope(failure) to do similar stuffs. I personally use both, on a case by case basis. Le 17/10/2011 06:47, Steve Teale a écrit : Is not needed because structs are inherently scope. I'm sure experienced D programmers do this al

Re: Implementing iterators for D custom data structures (best practices)

2011-10-17 Thread deadalnix
In addition, I would like to mention this confrence by Andrei Alexandrescu : http://blip.tv/boostcon/boostcon-2009-keynote-2452140 Le 17/10/2011 04:55, Jonathan M Davis a écrit : On Monday, October 17, 2011 10:22:42 Granville Barnett wrote: Hi All, I've not used D for long so hopefully this q

Re: FastCGI binding or implementation?

2011-10-17 Thread Jacob Carlborg
On 2011-10-17 10:14, Andrea Fontana wrote: I'm working on a SCGI implementation for my job. SCGI is quite easy to handle and well-supported by servers. The only missing part is multipart POST (used for file post). get, post, cookie, headers (etc..) just work. I have to ask permission to publish

Re: FastCGI binding or implementation?

2011-10-17 Thread Andrea Fontana
I'm working on a SCGI implementation for my job. SCGI is quite easy to handle and well-supported by servers. The only missing part is multipart POST (used for file post). get, post, cookie, headers (etc..) just work. I have to ask permission to publish my code, btw it's a very easy protocol to