Re: So what does (inout int = 0) do?

2016-04-15 Thread Kenji Hara via Digitalmars-d
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 >> >>

Re: So what does (inout int = 0) do?

2016-04-15 Thread Kenji Hara via Digitalmars-d
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

Re: DIP82: static unittest blocks

2015-09-27 Thread Kenji Hara via Digitalmars-d
taticUnittest()); } string makeStaticUnittest() { return "static unittest { ... }"; } Kenji Hara

Re: How to partially forward properties of struct array member to struct (disable length property) ?

2015-09-08 Thread Kenji Hara via Digitalmars-d-learn
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; }

Re: Beta D 2.068.1-b2

2015-08-31 Thread Kenji Hara via Digitalmars-d-announce
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

Re: Arrays and struct assignment, pt. 2

2015-08-01 Thread Kenji Hara via Digitalmars-d
-Programming-Language/dmd/pull/4856 Kenji Hara

Re: Compile error!

2015-07-31 Thread Kenji Hara via Digitalmars-d
Kenji Hara

Re: Destructors and static array assignment

2015-07-20 Thread Kenji Hara via Digitalmars-d
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

Re: Destructors and static array assignment

2015-07-20 Thread Kenji Hara via Digitalmars-d
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

Re: What is TypeIdent in the ABI spec ?

2015-07-07 Thread Kenji Hara via Digitalmars-d
be removed from the spec. Kenji Hara

Re: ReturnType and overloaded functions

2015-06-12 Thread Kenji Hara via Digitalmars-d
). Kenji Hara

Re: Bug 14666, can we prioritize ?

2015-06-10 Thread Kenji Hara via Digitalmars-d
/a04cf864b932061ad7b72e7cad8b16fabc6a825a Kenji Hara

Re: Bug 14666, can we prioritize ?

2015-06-10 Thread Kenji Hara via Digitalmars-d
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

Re: Negation of attributes (DIP 79)

2015-06-04 Thread Kenji Hara via Digitalmars-d
. Kenji Hara

Re: Negation of attributes (DIP 79)

2015-06-03 Thread Kenji Hara via Digitalmars-d
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

Re: can't initialize .outer in inner class

2015-05-06 Thread Kenji Hara via Digitalmars-d
://issues.dlang.org/show_bug.cgi?id=8863 Kenji Hara

Re: Cannot use the same template arguments on function as the ones on struct

2015-02-12 Thread Kenji Hara via Digitalmars-d-learn
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

Re: Const-correctness and uniqueness. Again.

2015-02-09 Thread Kenji Hara via Digitalmars-d
. 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

Re: class is forward referenced when looking for 'v'

2015-01-30 Thread Kenji Hara via Digitalmars-d-learn
request to fix compiler. Kenji Hara

Re: Should we remove int[$] before 2.067?

2015-01-30 Thread Kenji Hara via Digitalmars-d
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],

Re: Should we remove int[$] before 2.067?

2015-01-30 Thread Kenji Hara via Digitalmars-d
for the declared variable type. I believe it will be useful for declarative style programming. Kenji Hara

Re: accept @pure @nothrow @return attributes

2015-01-26 Thread Kenji Hara via Digitalmars-d
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

Re: accept @pure @nothrow @return attributes

2015-01-26 Thread Kenji Hara via Digitalmars-d
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

Re: Segfault upon modifying immutable AA in static this

2015-01-24 Thread Kenji Hara via Digitalmars-d-learn
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

Re: Initialization of structure field w/o default ctor

2015-01-22 Thread Kenji Hara via Digitalmars-d-learn
as a construction for the field Bar.foo. Kenji Hara

Re: UDAs grammar: @template_instance valid?

2014-10-29 Thread Kenji Hara via Digitalmars-d
Expressions(); udas-push(exp); } } Kenji Hara

Re: Make const, immutable, inout, and shared illegal as function attributes on the left-hand side of a function

2014-10-09 Thread Kenji Hara via Digitalmars-d
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

Re: [GDC] Evaluation order: Please update the dmd backend

2014-10-01 Thread Kenji Hara via Digitalmars-d
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

Re: Deprecations: Any reason left for warning stage?

2014-09-30 Thread Kenji Hara via Digitalmars-d
. 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

Re: v2.065.zip not found

2014-08-28 Thread Kenji Hara via Digitalmars-d
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

Re: Automatic Inference for Both Key and Value Types of an Associative Array

2014-08-15 Thread Kenji Hara via Digitalmars-d
(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

Re: Redirect to different overloads at compile time?

2014-06-29 Thread Kenji Hara via Digitalmars-d-learn
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

Re: Don't Understand why Phobos Auto-Tester fails for PR #3606

2014-06-07 Thread Kenji Hara via Digitalmars-d-learn
! I commented in github. Kenji Hara

Re: Issue 9148

2014-06-05 Thread Kenji Hara via Digitalmars-d
-Programming-Language/dmd/pull/3626 Kenji Hara

Re: static unittest

2014-04-30 Thread Kenji Hara via Digitalmars-d
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

Re: Default arguments in function callbacks not taken into account when instantiating templates has huge security implications

2014-04-29 Thread Kenji Hara via Digitalmars-d
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

Re: Why are immutable fields with initializers deprecated?

2014-04-29 Thread Kenji Hara via Digitalmars-d
#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

Re: CTFE error, but I have no idea what it means.

2014-04-03 Thread Kenji Hara
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

Re: template interface and delegates

2014-04-02 Thread 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

Re: Numbering compiler error messages?

2014-03-29 Thread 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

Re: Changing the behavior of the comma operator

2014-03-25 Thread Kenji Hara
be a good way. Kenji Hara

Re: Should we deprecate comma?

2014-03-23 Thread Kenji Hara
, this is not a bug. So, completely removing comma operator will cause negative affect in some cases. Kenji Hara

Re: Should we deprecate comma?

2014-03-23 Thread 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

Re: Status of multidimensional slicing

2014-03-12 Thread Kenji Hara
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

Re: DIP 57: static foreach

2014-03-10 Thread 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

Re: strange compilation error

2014-03-10 Thread 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

Re: Checking the Return Type of a Template Alias Parameter in assertCTFEable

2014-02-28 Thread 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

Re: _aaLen may throw (again) on DMD git master

2014-02-20 Thread Kenji Hara
/show_bug.cgi?id=12214 Kenji Hara

Re: TypeInfo in the library

2014-02-17 Thread 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

Re: switch()

2014-02-17 Thread Kenji Hara
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

Re: TypeInfo in the library

2014-02-17 Thread 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

Re: Redundancy/conflicts in expression rules.

2014-02-12 Thread Kenji Hara
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

Re: Review of DIP49

2014-02-03 Thread 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

Re: Review of DIP53

2014-02-03 Thread 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

Re: Want your DMD to segfault?

2014-01-30 Thread Kenji Hara
'. https://d.puremagic.com/issues/show_bug.cgi?id=12040 Kenji Hara

Re: Possibly a fatal DDoc regression?

2014-01-28 Thread 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

Re: Possibly a fatal DDoc regression?

2014-01-28 Thread Kenji Hara
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

Re: int** should be compatible to void**?

2014-01-22 Thread Kenji Hara
! 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

Re: Unions with overlapping fields are not yet supported in CTFE

2014-01-14 Thread Kenji Hara
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 :)

Re: phobos dependencies

2014-01-05 Thread Kenji Hara
be a net large win. is not correct. Kenji Hara

Re: phobos dependencies

2014-01-05 Thread 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

Re: DIP53 and DIP49 (ver2) - New definitions for qualified constructors and postblits

2013-12-19 Thread Kenji Hara
be enough easy compared with the currently implemented thing. Kenji Hara

Re: DIP53 and DIP49 (ver2) - New definitions for qualified constructors and postblits

2013-12-19 Thread 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

Re: DIP53 and DIP49 (ver2) - New definitions for qualified constructors and postblits

2013-12-19 Thread Kenji Hara
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

Re: DIP53 and DIP49 (ver2) - New definitions for qualified constructors and postblits

2013-12-19 Thread Kenji Hara
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

Re: DIP53 and DIP49 (ver2) - New definitions for qualified constructors and postblits

2013-12-19 Thread Kenji Hara
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

Re: DIP53 and DIP49 (ver2) - New definitions for qualified constructors and postblits

2013-12-18 Thread 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

Re: DIP53 and DIP49 (ver2) - New definitions for qualified constructors and postblits

2013-12-18 Thread Kenji Hara
.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

Re: DIP53 and DIP49 (ver2) - New definitions for qualified constructors and postblits

2013-12-18 Thread 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

DIP53 and DIP49 (ver2) - New definitions for qualified constructors and postblits

2013-12-17 Thread Kenji Hara
same qualifiers Kenji Hara

DIP53 and DIP49 (ver2) - New definitions of qualified constructors and postblits

2013-12-16 Thread Kenji Hara
qualifiers Kenji Hara

Re: Type inference and overloaded functions

2013-12-12 Thread 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

Re: Type inference and overloaded functions

2013-12-10 Thread 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

Re: Type inference and overloaded functions

2013-12-10 Thread 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

Re: Type inference and overloaded functions

2013-12-09 Thread 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

Re: Template condition triggers compiler error?

2013-12-01 Thread 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

Re: alias this leads to compilation error in one of two similar contexts

2013-12-01 Thread Kenji Hara
; // also NG, my_integer cannot *initialize* by int value num = my_interger(n); // OK } } Kenji Hara

Re: Is this a bug?

2013-11-28 Thread 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

Re: Function literal bug?

2013-11-28 Thread Kenji Hara
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

Re: casting as char at CT fail

2013-11-27 Thread 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

Re: @property (again)

2013-11-21 Thread 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

Re: @property (again)

2013-11-21 Thread 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

Re: @property (again)

2013-11-21 Thread Kenji Hara
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

Re: Function template literals - or just parameter type inference?

2013-11-20 Thread Kenji Hara
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

Re: Function template literals - or just parameter type inference?

2013-11-20 Thread Kenji Hara
lambda will make the template code unreliable. I think it is not good feature in general. Kenji Hara

Re: pure-ifying my code

2013-11-20 Thread 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

Re: Calling Base Class Overriden Methods

2013-11-18 Thread 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

Re: dchar literals?

2013-11-12 Thread Kenji Hara
Kenji Hara

Re: DIP49 - Define qualified postblit

2013-11-11 Thread 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

Re: DIP49 - Define qualified postblit

2013-11-11 Thread Kenji Hara
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

Re: DIP49 - Define qualified postblit

2013-11-11 Thread 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

Re: DIP49 - Define qualified postblit

2013-11-10 Thread 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

Re: DIP49 - Define qualified postblit

2013-11-10 Thread 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

Re: DIP49 - Define qualified postblit

2013-11-10 Thread Kenji Hara
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

Re: DIP49 - Define qualified postblit

2013-11-10 Thread Kenji Hara
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

Re: DIP49 - Define qualified postblit

2013-11-10 Thread Kenji Hara
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

Re: dmd 2.065 - Agenda

2013-11-09 Thread Kenji Hara
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

DIP49 - Define qualified postblit

2013-11-09 Thread Kenji Hara
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

Re: Copy elision by spec

2013-11-04 Thread Kenji Hara
keep std.typecons.scoped in standard library. Kenji Hara

Re: Initialization vs Assignment

2013-11-03 Thread 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   2   3   4   5   6   >