2016-04-15 22:41 GMT+09:00 Andrei Alexandrescu via Digitalmars-d <
digitalmars-d@puremagic.com>:
> On 04/15/2016 06:50 AM, Kenji Hara via Digitalmars-d wrote:
>
>>
>>
>> You should recall the history of inout.
>> http://wiki.dlang.org/DIP2
>>
>>
dy. Therefore when inout
qualifier appears in function return type, but doesn't on parameter types,
we defined it an error.
However, I concluded that we can remove the restriction. When an inout
object arises from thin air, no one holds the qualifier of its real
instance. It means, the returned inout object can be converted to arbitrary
qualifiers without type system breaking.
Two years ago I opened an enhancement issue:
https://issues.dlang.org/show_bug.cgi?id=13006
And posted a pull request.
https://github.com/D-Programming-Language/dmd/pull/3740
Kenji Hara
taticUnittest());
}
string makeStaticUnittest() { return "static unittest { ... }"; }
Kenji Hara
On Sunday, 6 September 2015 at 10:12:58 UTC, ParticlePeter wrote:
In the end all that I want is "just" to disable access to
array.length through vector and alias this array.
struct Vec(T, size_t n = 3)
{
T[n] data;
alias data this;
@disable @property size_t length() const;
}
On Monday, 31 August 2015 at 07:08:20 UTC, Jacob Carlborg wrote:
On 2015-08-31 08:01, Martin Nowak wrote:
First beta for the 2.068.1 point release (we skipped -b1 due
to a bug).
I started compile my projects with DMD 2.068.0 (yes, I know I'm
a bit late). I noted that this piece of code that
-Programming-Language/dmd/pull/4856
Kenji Hara
Kenji Hara
And, even after the bug is fixed, I think it's debatable behavior whether
an element-wise assignment should call opAssign on each elements, because
it can be a kind of optimization.
Related issue: https://issues.dlang.org/show_bug.cgi?id=8931
Kenji Hara
2015-07-20 23:18 GMT+09:00 David Nadlinger via
2015-07-20 23:52 GMT+09:00 Kenji Hara k.hara...@gmail.com:
At least there's a dmd bug.
For such static array assignment, dmd should use druntime function, but
instead plain memory copy operation used.
https://github.com/D-Programming-Language/dmd/blob/master/src/e2ir.c#L2920
https
be removed from the spec.
Kenji Hara
).
Kenji Hara
/a04cf864b932061ad7b72e7cad8b16fabc6a825a
Kenji Hara
issues in HEAD:
https://github.com/D-Programming-Language/dmd/pull/4731
https://github.com/D-Programming-Language/dmd/pull/4738
I'll be happy when you prioritize the PRs.
Kenji Hara
.
Kenji Hara
For final, override, abstract, and synchronized attributes, I'm trying to
relax the limitation in:
https://issues.dlang.org/show_bug.cgi?id=2091
https://github.com/D-Programming-Language/dmd/pull/4714
Kenji Hara
2015-06-03 13:47 GMT+09:00 ketmar via Digitalmars-d
digitalmars-d@puremagic.com
://issues.dlang.org/show_bug.cgi?id=8863
Kenji Hara
be optional anyway.
It would be a compiler bug. As far as I know, accepter() and
accepter!()() has no difference in IFTI.
I filed the issue in bugzilla.
https://issues.dlang.org/show_bug.cgi?id=14174
Kenji Hara
.
In general, pure function can access immutable global data, and can return
its address.
Therefore, if a pure function returns immutable data, the returned
pointer/reference to immutable a data should not be convertible to mutable.
Kenji Hara
request to fix compiler.
Kenji Hara
2015-01-31 1:53 GMT+09:00 Nick Treleaven via Digitalmars-d
digitalmars-d@puremagic.com:
This version of staticArray allows the user to (optionally) specify the
element type.
How the API can replace following declaration with ?
auto[$][][$] = [
[[1,2]],
[[3,4], [5,6]],
[[7,8],
for the declared variable
type. I believe it will be useful for declarative style programming.
Kenji Hara
far I agree with Jonathan.
Bye,
bearophile
Me too. At best it is just a cosmetic change, and will introduce huge code
style confusion.
We should revert it quickly.
Kenji Hara
to symbols only.
void foo() @uda {}
// __traits(getAttributes, foo) == (uda)
// pragma(msg, typeof(foo)); prints void(), no @uda
void function() @uda fp;
// Error: user defined attributes cannot appear as postfixes
Kenji Hara
of the AAs or can I preserve my
convenient foreach over the AAs in the `static this` to
automatically get the integer value to be stored?
Note that this does not segdefault on latest stable DMD 2.066.
It's a regression in git-head.
https://issues.dlang.org/show_bug.cgi?id=14038
Kenji Hara
as a construction for
the field Bar.foo.
Kenji Hara
Expressions();
udas-push(exp);
}
}
Kenji Hara
2014-10-09 23:17 GMT+09:00 Steven Schveighoffer via Digitalmars-d
digitalmars-d@puremagic.com:
Just one point to make, this will still work, right?:
const {
int foo();
}
const:
int foo();
My PR still allows those block or label style attributes.
Kenji Hara
Now I'm working to fix issue 6620
https://issues.dlang.org/show_bug.cgi?id=6620
https://github.com/D-Programming-Language/dmd/pull/4035
Kenji Hara
2014-04-01 20:49 GMT+09:00 Johannes Pfau nos...@example.com:
I started fixing GDC bug #8 (*) which is basically that array op
evaluation order
. Thus, I think we should simply get rid of the
warning step, just like we (de facto) eliminated the scheduled for
deprecation stage from the Phobos process.
Thoughts?
I agree that the current warning stage for the deprecated features is
useless.
Kenji Hara
Older packages available in:
http://downloads.dlang.org/releases/
Direct link to the 2.065 zip file is:
http://downloads.dlang.org/releases/2014/dmd.2.065.0.zip
Kenji Hara
2014-08-28 20:49 GMT+09:00 Chris via Digitalmars-d
digitalmars-d@puremagic.com:
Is there any chance this could be made
(aa15) == int[int[][2]]));
Kenji Hara
2014-08-08 1:07 GMT+09:00 Meta via Digitalmars-d
digitalmars-d@puremagic.com:
Something H.S. Teoh in a recent pull request in Github got me thinking
that it would be useful in some cases to tell the compiler that you want to
automatically infer the either
a) { writeln(typeof(a).stringof);
return a; }
float foo_float (float a) { writeln(typeof(a).stringof);
return a; }
}
alias foo = foo_double;
alias foo = foo_float;
void main()
{
double d;
float f;
foo(d); // prints double
foo(f); // prints float
}
Kenji Hara
!
I commented in github.
Kenji Hara
-Programming-Language/dmd/pull/3626
Kenji Hara
std.exception.assertCTFEable ?
Kenji Hara
2014/05/01 1:56 Andrei Alexandrescu via Digitalmars-d
digitalmars-d@puremagic.com:
Walter and I also discussed static unittest a while ago - yes, another
use of static :o).
A static unittest would be evaluated only during compilation, and would
void function(string, string) is not
callable using one string argument.
Kenji Hara
2014-04-29 19:38 GMT+09:00 Andrej Mitrovic via Digitalmars-d
digitalmars-d@puremagic.com:
-
import std.traits;
import std.stdio;
void handler(C)(C callback)
{
callback(John);
}
void main
#staticfields
http://dlang.org/changelog#staticfields2
Kenji Hara
2014-04-30 2:09 GMT+09:00 Andrei Alexandrescu via Digitalmars-d
digitalmars-d@puremagic.com:
A recent discussion https://github.com/D-Programming-Language/dmd/pull/
3452 brought up a matter I'd forgotten - struct fields
On Monday, 31 March 2014 at 11:51:50 UTC, Olav Lindekleiv wrote:
Here's the issue:
http://d.puremagic.com/issues/show_bug.cgi?id=12498
Fixed in git-head.
https://github.com/D-Programming-Language/dmd/commit/2c4d8ad711ccb7c94d349830523dd500580b0130
Kenji Hara
already
reported, someone will close it as a duplicate
-Steve
I filed it.
https://d.puremagic.com/issues/show_bug.cgi?id=12508
Kenji Hara
to maintain error number feature.
Kenji Hara
2014-03-30 5:11 GMT+09:00 H. S. Teoh hst...@quickfur.ath.cx:
On Sat, Mar 29, 2014 at 12:00:51PM -0700, Walter Bright wrote:
On 3/29/2014 11:02 AM, Brad Anderson wrote:
For example, in VC++ if you get C2001 newline in constant you
can just lookup
be a good way.
Kenji Hara
, this is not a bug.
So, completely removing comma operator will cause negative affect in
some cases.
Kenji Hara
2014-03-24 10:38 GMT+09:00 Daniel Murphy yebbliesnos...@gmail.com:
Kenji Hara k.hara...@gmail.com wrote in message
news:mailman.27.1395624482.25518.digitalmar...@puremagic.com...
2014-03-24 10:09 GMT+09:00 bearophile bearophileh...@lycos.com:
if (cond) exp1, exp2; // in most case
2014-03-08 10:24 GMT+09:00 Andrei Alexandrescu
seewebsiteforem...@erdani.org:
I agree and sympathize.
I finished to update my pull request #443. Now it is active.
Kenji Hara
in CT
writeln(RT: i = , i); // prints only 1 in RT
}
}
So, I think that static foreach *cannot* support break and continue as same
as foreach with tuples.
Kenji Hara
On Sunday, 9 March 2014 at 11:21:19 UTC, Jack Applegame wrote:
This fails to compile
http://dpaste.dzfl.pl/e9a90e808af4
It's a compiler bug.
https://d.puremagic.com/issues/show_bug.cgi?id=12334
https://github.com/D-Programming-Language/dmd/pull/3371
Kenji Hara
= 0;
, __ctmp1582).this(1), 2LU));
assert(equal(r, [(S __ctmp1591 = 0;
, __ctmp1591).this(1), (S __ctmp1592 = 0;
, __ctmp1592).this(1)]));
}
)() is void and has no value
How can I in a general way check if dg evaluates to void or not?
Maybe:
cast(void)dg();
Kenji Hara
/show_bug.cgi?id=12214
Kenji Hara
If a function is only used for CTFE, compiler can elide its codegen. It's
in the scope of optimization.
Kenji Hara
2014-02-17 22:48 GMT+09:00 Dicebot pub...@dicebot.lv:
On Monday, 17 February 2014 at 09:33:01 UTC, Max Samukha wrote:
But that's an awful dangerous hack. A better solution
the rubble.
I completely agree with Andrei. We should continue to keep that D is the
successor of the most used system languages - C and C++. it's a *huge*
advantage against other modern languages.
Kenji Hara
2014-02-18 0:48 GMT+09:00 Dicebot pub...@dicebot.lv:
On Monday, 17 February 2014 at 14:51:20 UTC, Kenji Hara wrote:
If a function is only used for CTFE, compiler can elide its codegen. It's
in the scope of optimization.
It can't know for sure it without some sort of WPO / LTO - and those
case, everything looks lean enough that I'll probably believe
your documented grammar more than the official dlang site. ;-)
In git head, 'Grammar' page is added.
https://github.com/D-Programming-Language/dlang.org/blob/master/grammar.dd
Kenji Hara
relationship among qualifiers
without stating it.
If we select this(this) unique syntax for unique postblit, the section
will be unnecessary.
Kenji Hara
constructor feature is too
hard to understand. and it is not consistent with DIP49. So if DIP49 is
accepted, I strongly recommend to accept also DIP53.
Kenji Hara
'.
https://d.puremagic.com/issues/show_bug.cgi?id=12040
Kenji Hara
Definitely yes. Please file the bug in bigzilla.
Kenji Hara
2014-01-28 Jakob Ovrum jakobov...@gmail.com
The prerelease std.uni documentation[1] is missing everything but the
documentation for the module declaration. I'm hitting what is probably the
same thing in one of my own projects[2
2014-01-28 Jakob Ovrum jakobov...@gmail.com
On Tuesday, 28 January 2014 at 08:40:55 UTC, Kenji Hara wrote:
Definitely yes. Please file the bug in bigzilla.
Filed[1], although the report is sparse; I don't know the details of the
problem.
[1] https://d.puremagic.com/issues/show_bug.cgi?id
!
assert(*ppn is cast(void*)px);
}
Kenji Hara
2014/1/22 Katayama Hirofumi MZ katayama.hirofumi...@gmail.com
Hello, this is a Japanese programmer, katahiromz.
If TYPE1 was compatible to TYPE2, I think TYPE1* should be compatible to
TYPE2*.
Why isn't int** type compatible to void** type
It's a duplicate of issue 11510.
https://d.puremagic.com/issues/show_bug.cgi?id=11510
Kenji Hara
2014/1/15 Andrea Fontana nos...@example.com
Any plan to fix this bug?
http://d.puremagic.com/issues/show_bug.cgi?id=10035
It could boost my app (and website) performance I guess :)
be a net large win. is not correct.
Kenji Hara
2014/1/6 Andrei Alexandrescu seewebsiteforem...@erdani.org
On 1/5/14 8:44 PM, Kenji Hara wrote:
Honestly, lazy import (== defer loading module file and running
semantic analysis for symbol search) would improve compilation speed for
selective imports and static imports, but it would have
be enough easy compared with the currently
implemented thing.
Kenji Hara
2013/12/20 Timon Gehr timon.g...@gmx.ch
On 12/19/2013 02:58 PM, Kenji Hara wrote:
2013/12/19 Timon Gehr timon.g...@gmx.ch mailto:timon.g...@gmx.ch
Well, a constructor can be thought of as yielding a result. A const
method returning 'this' cannot return an 'immutable' object
2013/12/20 Michel Fortin michel.for...@michelf.ca
On 2013-12-18 03:42:38 +, Kenji Hara k.hara...@gmail.com said:
http://wiki.dlang.org/DIP49
Improved points from version 1:
- Swap meanings of 'this(this) inout' and 'this(this) const'
- Inout postblit now covers all cheap (== not rebind
2013/12/20 deadalnix deadal...@gmail.com
On Thursday, 19 December 2013 at 15:32:33 UTC, Kenji Hara wrote:
I think it is necessary small learning cost, to keep language semantics
simple.
Kenji Hara
If that is an extra learning cost, doesn't it make the semantic more
complex, almost
bug.
http://d.puremagic.com/issues/show_bug.cgi?id=11292
However, I'm purposely delaying to fix the bug, because of DIP49.
Kenji Hara
I think adding new keyword/attribute just for readability is overkill.
Kenji Hara
2013/12/18 ilya-stromberg ilya-stromberg-2...@yandex.ru
On Wednesday, 18 December 2013 at 11:10:10 UTC, QAston wrote:
On Wednesday, 18 December 2013 at 03:42:46 UTC, Kenji Hara wrote:
http://wiki.dlang.org
.27const.27_constructor_will_be_called_to_create_arbitrary_qualified_object.3F
There's no violation against the widely known const method concept.
Kenji Hara
for a
_different_ concept. There is no way to implement the above constructor
using the new semantics.
No, that's not merely syntactic choice. The 'const' constructor/postblit is
a natural conclusion derived from the semantic meaning.
I tweaked descriptions in DIP to express it more clearly.
Kenji Hara
same qualifiers
Kenji Hara
qualifiers
Kenji Hara
, 5, 6]s) would easily cause
memory corruption. I don't want to hurt language future by the
trivial syntactic sugar.
Kenji Hara
literal should
match _only_ dynamic array types, it would never work.
Because compiler will try to match array literal to static array
T[n]. The feature which I have described is working here.
Kenji Hara
code bloat.
void foo(T)(T arg) { ... }
foo(aaa); // instantiate foo!(char[3])
foo(); // instantiate foo!(char[4])
foo([1,2]);// instantiate foo!(int[2])
foo([1,2,3]); // instantiate foo!(int[3])
So their types were changed to dynamic array by default.
Kenji Hara
both to
int[] and int[3].
And, int[3] is more specialized than int[], so overload
resolution will choose the first 'bar'.
Kenji Hara
on Linux with 64 bit, but it fails on Windows
7 32 bit.
Bug, feature or my fault?
Compiler bug.
https://d.puremagic.com/issues/show_bug.cgi?id=11662
Kenji Hara
; // also NG, my_integer cannot *initialize* by
int value
num = my_interger(n); // OK
}
}
Kenji Hara
Might be related?
https://d.puremagic.com/issues/show_bug.cgi?id=11406
Kenji Hara
2013/11/27 Jerry jlqu...@optonline.net
Philippe Sigaud philippe.sig...@gmail.com writes:
No crash on Linux (Kubuntu) 32bits, DMD 2.064.2.
Works with 5 or 6 case's also.
This is actually Ubuntu 12.10 64
it has
more bugs.
Bye,
bearophile
It's a known front-end issue.
https://d.puremagic.com/issues/show_bug.cgi?id=11545
Kenji Hara
is needed
thanks to everyone
I found two compiler issues:
https://d.puremagic.com/issues/show_bug.cgi?id=11627
https://d.puremagic.com/issues/show_bug.cgi?id=11629
Kenji Hara
by calling 'func'?
That was particularly important problem for the Range.front API design in
D2.
To fix the issue, @property attribute has been introduced.
At least to me, your argument is just to return to the C era. I think it
will introduce huge 'regression'.
Kenji Hara
2013/11/22 deadalnix deadal...@gmail.com
On Friday, 22 November 2013 at 01:33:44 UTC, Kenji Hara wrote:
At least to me, your argument is just to return to the C era. I think it
will introduce huge 'regression'.
This is an important misunderstanding of my position. The C era is bad,
the D
2013/11/22 deadalnix deadal...@gmail.com
On Friday, 22 November 2013 at 04:33:56 UTC, Kenji Hara wrote:
After removing 'function' concept, 'func' always means function pointer or
delegate. So we cannot call functions without parenthesis anymore. It is
unacceptable change to me, and many D
as
// `template __lambda(__T){ auto __lambda(__T a) { return 1; } }`
}
I was not sure that the fun!int is legitimate usage. Therefore, I didn't
mention about the 'template lambda' semantics in documentation.
Therefore currently, it is merely an implementation detail.
Kenji Hara
lambda will make the
template code unreliable.
I think it is not good feature in general.
Kenji Hara
, not
a compiler dev.
- Jonathan M Davis
I opened a new pull request to fix the compiler issue.
https://github.com/D-Programming-Language/dmd/pull/2832
Kenji Hara
() {
auto d = new D();
assert(d.foo() == 3);// calls D.foo
assert(d.B.foo() == 1); // calls B.foo
assert(d.C.foo() == 2); // calls C.foo
d.test();
}
=
Kenji Hara
Kenji Hara
2013/11/10 Daniel Murphy yebbl...@nospamgmail.com
Kenji Hara k.hara...@gmail.com wrote in message
news:mailman.339.1384090714.9546.digitalmar...@puremagic.com...
2013/11/10 Daniel Murphy yebbl...@nospamgmail.com
Kenji Hara k.hara...@gmail.com wrote in message
news:mailman
couldn't convince about his thought.
DIP49 is the final conclusion of my belief. I can say that copy constructor
is unnecessary in D.
Kenji Hara
2013/11/11 Marco Leise marco.le...@gmx.de
Am Sun, 10 Nov 2013 21:03:34 +0900
schrieb Kenji Hara k.hara...@gmail.com:
So, separating inout postblit' and 'unique postblit' may be reasonable.
(However, it seems to me that the syntax this(inout this) inout; looks
weird...
Kenji Hara
, otherwise it may
break type system
The requirements are exactly same as what necessary for unique postblit.
Essentially creating unique copy is exactly same as treating the copy
source as inout.
Kenji Hara
2013/11/10 Timon Gehr timon.g...@gmx.ch
On 11/10/2013 07:46 AM, Kenji Hara wrote:
http://wiki.dlang.org/DIP49
Experimental compiler/druntime patches (WIP, 80% completed):
https://github.com/9rnsr/dmd/tree/qual_pblit
https://github.com/9rnsr/druntime/tree/qual_pblit
Kenji Hara
Well
2013/11/10 Timon Gehr timon.g...@gmx.ch
On 11/10/2013 12:07 PM, Kenji Hara wrote:
Condider a case that copying inout struct inside inout function.
struct S {
int[] arr;
this(this) ??? { }
}
int[] foo(inout S src)
{
S dst = src; // copy inout S to S
return dst.arr
2013/11/10 Daniel Murphy yebbl...@nospamgmail.com
Kenji Hara k.hara...@gmail.com wrote in message
news:mailman.336.1384083327.9546.digitalmar...@puremagic.com...
This is valid. Because not only strongly pure function will return unique
object.
For example:
immutable(int)[] foo(int
2013/11/10 Daniel Davidson nos...@spam.com
On Sunday, 10 November 2013 at 06:46:47 UTC, Kenji Hara wrote:
http://wiki.dlang.org/DIP49
Experimental compiler/druntime patches (WIP, 80% completed):
https://github.com/9rnsr/dmd/tree/qual_pblit
https://github.com/9rnsr/druntime/tree/qual_pblit
Added language enhancements from my working list.
Kenji Hara
2013/11/9 Martin Nowak c...@dawg.eu
I made a wiki page for that.
Please discuss, improve and prioritize.
http://wiki.dlang.org/Agenda
http://wiki.dlang.org/DIP49
Experimental compiler/druntime patches (WIP, 80% completed):
https://github.com/9rnsr/dmd/tree/qual_pblit
https://github.com/9rnsr/druntime/tree/qual_pblit
Kenji Hara
keep std.typecons.scoped in standard library.
Kenji Hara
is timely fixed in 2.064.
http://d.puremagic.com/issues/show_bug.cgi?id=9665
https://github.com/D-Programming-Language/dlang.org/pull/404
Therefore with 2.064, the first test case will output following:
-
~A(84)
Kenji Hara
1 - 100 of 526 matches
Mail list logo