Ellery Newcomer wrote:
taqya wrote:
char[] a = "a".dup;
char[] b = "b".dup;
writefln(a + b); //Error: Array operations not implemented
If so, the error informs you why you can't do that.
Except that it doesn't. "Array operations not implemented" is a
leftover from a previou
bearophile пишет:
> Weed, some built-ins and significant part of the standard lib (and other libs
> you can find around) assume the presence of a GC.
Right. For example, return from function of a dynamic array will not
work correctly without GC - there will be a memory leak.
> So you can disable
On Wed, 04 Feb 2009 21:04:16 +0100, Jarrett Billingsley
wrote:
Nope. The C struct is defining a bitfield; a and b will actually be
contained within a single 4-byte field. Your D version defines three
integers.
Unfortunately the C specification does not specify any required
ordering for bit
On Wed, Feb 4, 2009 at 2:55 PM, Mike wrote:
> Hi!
>
> I'm in the process of translating some C headers (still ffmpef -> libavcode
> and libavformat) to D and there are some really ugly structs in the C
> headers which I'm trying to translate.
>
> - C -
>
> typedef struct xy
> {
>int a:1;
>
Hi!
I'm in the process of translating some C headers (still ffmpef ->
libavcode and libavformat) to D and there are some really ugly structs in
the C headers which I'm trying to translate.
- C -
typedef struct xy
{
int a:1;
int b:2;
int c;
}
- D -
struct xy
{
align (1)
Please tell me when I got something wrong : )
>>>
>>> arr = arr[ 0 .. lowerBound ] ~ arr[ upperBound .. $ ];
>>>
>>
>> That's simple enough, but inefficient.
Because it loops over arr.length-2 and copies the pointers.
Will the compiler optimize by not copying the [0..lowerbound] part?
And will the
Tim M wrote:
On Wed, 04 Feb 2009 15:38:45 +1300, Weed wrote:
It is possible to disable GC?
That it has not been included in result binary for an increasing
performance of ref operations and reduction of the size of the binary
I have not found the answer in google.
To anyone here that disa
Weed, some built-ins and significant part of the standard lib (and other libs
you can find around) assume the presence of a GC.
So you can disable (or often just not use it. If you don't allocate/free
GC-managed memory then the GC sleeps) in some critical spots of your code as I
do (and you can
On Wed, 04 Feb 2009 15:38:45 +1300, Weed wrote:
It is possible to disable GC?
That it has not been included in result binary for an increasing
performance of ref operations and reduction of the size of the binary
I have not found the answer in google.
To anyone here that disables there GC: