digitalmars.D - loadLibrary string
- =?UTF-8?B?Ikx1w61z?= Marques" (10/10) Jun 01 2013 In the talk "Shared Libraries in D by Martin Nowak" loadLibrary
- David Nadlinger (3/6) Jun 01 2013 There is no head const in D.
- =?UTF-8?B?Ikx1w61z?= Marques" (3/4) Jun 01 2013 So is having an "in char[]" the same as having an
- Adam D. Ruppe (11/13) Jun 01 2013 Almost. in basically means const, so it can take strings or
- Jonathan M Davis (7/12) Jun 01 2013 "in char" is equivalent to "scope const char[]". The scope does not curr...
- =?UTF-8?B?Ikx1w61z?= Marques" (9/9) Jun 01 2013 Either Google is buggy or there may be something wrong with the
In the talk "Shared Libraries in D by Martin Nowak" loadLibrary is presented with the signature: void* loadLibrary(string path); But in the docs we have: static void* loadLibrary(in char[] name); Any particular reason for using "in char[]" instead of string? (I suppose the "in" makes the string head constant, but not the string body.) Path also seems slightly more explicit than "name", so consider that if someone wants to change it.
Jun 01 2013
On Saturday, 1 June 2013 at 20:01:18 UTC, Luís Marques wrote:Any particular reason for using "in char[]" instead of string? (I suppose the "in" makes the string head constant, but not the string body.)There is no head const in D. — David
Jun 01 2013
On Saturday, 1 June 2013 at 20:20:14 UTC, David Nadlinger wrote:There is no head const in D.So is having an "in char[]" the same as having an immutable(char)[] / string?
Jun 01 2013
On Saturday, 1 June 2013 at 20:23:23 UTC, Luís Marques wrote:So is having an "in char[]" the same as having an immutable(char)[] / string?Almost. in basically means const, so it can take strings or char[]. void foo(string s); void foo2(in char s); char[] a; string b; foo(a); // not allowed foo(b); // allowed foo2(a); // allowed foo2(b); // also allowed
Jun 01 2013
On Saturday, June 01, 2013 22:23:22 =?UTF-8?B?Ikx1w61z?=.Marques <luismarques gmail.com> puremagic.com wrote:On Saturday, 1 June 2013 at 20:20:14 UTC, David Nadlinger wrote:"in char" is equivalent to "scope const char[]". The scope does not currently have any effect, but by having const char[], char[], const(char)[], and immutable(char)[] can all be passed to the loadLibrary, whereas if it accepted string, then only immutable(char)[] could be passed to it. - Jonathan M DavisThere is no head const in D.So is having an "in char[]" the same as having an immutable(char)[] / string?
Jun 01 2013
Either Google is buggy or there may be something wrong with the times presented by the forum. I was searching for loadLibrary and found my own post: loadLibrary string - D Programming Language Discussion forum.dlang.org/post/xtkqpnortzookwvryzlv forum.dlang.org 13 hours ago - 1 post This wasn't 13 hours ago. Is there some timestamp that may be lacking the correct timezone information, or something like that, that could help Google correctly deduce the time?
Jun 01 2013