On 12/12/14 2:47 AM, bearophile wrote:
OK, I think that it will be enough to add a Phobos function like this
(what's the right Phobos module to put it?) (why isn't this @trusted?)
(why isn't this returning a T*?):
ref T uninitializedAlloc(T)() @system pure nothrow
{
return
Walter Bright:
On 12/11/2014 1:49 PM, bearophile wrote:
Walter Bright:
struct Vec { float x = 1, y = 5, z = 9; }
auto v = new Vec(void);
auto av = new Vec[10] = void;
auto av2 = new Vec[10] = Vec(0, 0, 0);
D already does this.
D doesn't do that, not even one of those three :-)
I beg
Walter Bright:
I don't see support for the notion of a ushort index.
A ushort index is not useful, I agree. That's why I have said my
proposal is a little different from Jonathan Blow idea.
My point was to optionally define built-in arrays with a strongly
typed indexing (where the
On 12/12/2014 10:54 AM, bearophile wrote:
This code:
struct Vec { float x = 1, y = 5, z = 9; }
auto v = new Vec(void);
Means having defined a struct with explicitly statically defined fields,
and then allocate one of it on the heap without initializing its fields.
It's equivalent to:
auto v =
Martin Nowak:
OK, I think that it will be enough to add a Phobos function like
this (what's the right Phobos module to put it?) (why isn't this
@trusted?) (why isn't this returning a T*?):
ref T uninitializedAlloc(T)() @system pure nothrow
{
return *cast(T*)GC.malloc(T.sizeof);
}
OK, I think that it will be enough to add a Phobos function
like this (what's the right Phobos module to put it?) (why
isn't this @trusted?) (why isn't this returning a T*?):
ref T uninitializedAlloc(T)() @system pure nothrow
{
return *cast(T*)GC.malloc(T.sizeof);
}
On 12/12/2014 11:42 AM, bearophile wrote:
Martin Nowak:
OK, I think that it will be enough to add a Phobos function like this
(what's the right Phobos module to put it?)
Did you just volunteer to make a pull :)?
As usual, having a problem to find the right place myself.
Would put it close to
On 12/11/2014 10:34 PM, Walter Bright wrote:
D already does this. It's been said before, Jonathan is reinventing D,
piece by piece :-)
What does that mean, it's been said?
Didn't anyone actually try to tell him about D?
On Friday, 12 December 2014 at 11:58:04 UTC, Martin Nowak wrote:
On 12/11/2014 10:34 PM, Walter Bright wrote:
D already does this. It's been said before, Jonathan is
reinventing D,
piece by piece :-)
What does that mean, it's been said?
Didn't anyone actually try to tell him about D?
On Thursday, 11 December 2014 at 16:57:35 UTC, bearophile wrote:
Jonathan Blow, Programming Language Demo #2:
https://www.youtube.com/watch?v=-UPFH0eWHEI
https://www.reddit.com/r/programming/comments/2oyg5e/jonathan_blow_dec_10_programming_language_demo_2/
--
He shows a way
On 12/12/2014 01:15 PM, Tobias Pankrath wrote:
Actually he dismisses D in his first video for being too much
like C++.
What do you usually do when learning a new programming language?
Right, write a small program. Apparently he ruled out all 3 candidates
by looking at the front page of their
On Friday, 12 December 2014 at 11:58:04 UTC, Martin Nowak wrote:
On 12/11/2014 10:34 PM, Walter Bright wrote:
D already does this. It's been said before, Jonathan is
reinventing D,
piece by piece :-)
What does that mean, it's been said?
He means he said it before: :)
On Friday, 12 December 2014 at 11:58:04 UTC, Martin Nowak wrote:
On 12/11/2014 10:34 PM, Walter Bright wrote:
D already does this. It's been said before, Jonathan is
reinventing D,
piece by piece :-)
What does that mean, it's been said?
Didn't anyone actually try to tell him about D?
I
On 12/12/2014 1:58 AM, bearophile wrote:
My point was to optionally define built-in arrays with a strongly typed indexing
(where the strongly typed index can be defined with a better version of
Typedef!()), as I've tried to explain in that post.
All you have to do is define your own array type
On 12/12/2014 3:57 AM, Martin Nowak wrote:
On 12/11/2014 10:34 PM, Walter Bright wrote:
D already does this. It's been said before, Jonathan is reinventing D,
piece by piece :-)
What does that mean, it's been said?
Didn't anyone actually try to tell him about D?
I've emailed him about it.
Jonathan Blow, Programming Language Demo #2:
https://www.youtube.com/watch?v=-UPFH0eWHEI
https://www.reddit.com/r/programming/comments/2oyg5e/jonathan_blow_dec_10_programming_language_demo_2/
--
He shows a way to not initialize a struct that has specified
values. In D it
On 12/11/2014 8:57 AM, bearophile wrote:
He shows a way to not initialize a struct that has specified values. In D it
could be:
struct Vec { float x = 1, y = 5, z = 9; }
auto v = new Vec(void);
auto av = new Vec[10] = void;
auto av2 = new Vec[10] = Vec(0, 0, 0);
D already does this. It's
Walter Bright:
struct Vec { float x = 1, y = 5, z = 9; }
auto v = new Vec(void);
auto av = new Vec[10] = void;
auto av2 = new Vec[10] = Vec(0, 0, 0);
D already does this.
D doesn't do that, not even one of those three :-) I'm willing to
open one or two ERs later on those things.
At best
Walter Bright:
struct Vec { float x = 1, y = 5, z = 9; }
auto v = new Vec(void);
auto av = new Vec[10] = void;
auto av2 = new Vec[10] = Vec(0, 0, 0);
D already does this.
D doesn't do that, not even one of those three :-) I'm willing to
open one or two ERs later on those things.
At best
On 12/11/2014 1:49 PM, bearophile wrote:
He suggests a way to optionally specify the type of array indexes. In a D-like
syntax it could be:
enum N = 10;
float[N : ushort] a1;
float[: ushort] a2;
I don't see any point to this.
My point of having this in D is to optionally increase
On 12/11/2014 1:49 PM, bearophile wrote:
Walter Bright:
struct Vec { float x = 1, y = 5, z = 9; }
auto v = new Vec(void);
auto av = new Vec[10] = void;
auto av2 = new Vec[10] = Vec(0, 0, 0);
D already does this.
D doesn't do that, not even one of those three :-)
I beg to differ:
21 matches
Mail list logo