On 2013-08-27 20:40, Maxim Fomin wrote:
Let's start from basics:
writeln = 42;
and this is also by design.
I see no reasons for why this should be allowed. I say:
* Getters marked with @property: call without parentheses
* Getters not marked with @property: call with or without parentheses
On Wed, Aug 28, 2013 at 02:13:39AM +0200, deadalnix wrote:
> On Tuesday, 27 August 2013 at 16:57:36 UTC, H. S. Teoh wrote:
[...]
> >Also, the fact that move() uses memcpy is a bit worrying; Adam Ruppe
> >& myself ran into a nasty bug involving closures over struct members
> >when the struct may get
On Tuesday, 27 August 2013 at 03:51:16 UTC, Walter Bright wrote:
http://imgur.com/k8DPDYq
So you're saying you've left the Empire business?
http://www.classicempire.com/
http://www.tshirtvortex.net/im-in-the-empire-business/
Sure that's not you in the gas mask? :-)
On Tuesday, 27 August 2013 at 23:52:59 UTC, captaindet wrote:
i admit that i am not very good at reading/understanding
language definition syntax. but yet i think the given enum
specs ( http://dlang.org/enum.html ) are not quite in order.
they seem to imply that both
enum ;
enum WhatAmI ;
Y
On Tuesday, 27 August 2013 at 16:57:36 UTC, H. S. Teoh wrote:
On Tue, Aug 27, 2013 at 05:46:40PM +0200, deadalnix wrote:
On Tuesday, 27 August 2013 at 14:26:53 UTC, H. S. Teoh wrote:
>What if move(r2) throws? Then res1 won't get cleaned up,
>because r1
>has already been nulled by the move.
>
i admit that i am not very good at reading/understanding language definition
syntax. but yet i think the given enum specs ( http://dlang.org/enum.html ) are
not quite in order.
they seem to imply that both
enum ;
enum WhatAmI ;
are correct. while the first one throws an error as expected, the
On Tue, Aug 27, 2013 at 06:08:11PM -0400, Nick Sabalausky wrote:
> I'm almost done with a script to generate the zip releases (plus 7z
> and OS-specific releases), but I've hit a few things that are blocking
> me from getting through much more of the final mile, so I wanted to
> ping them here in c
On Tuesday, 27 August 2013 at 22:24:21 UTC, JS wrote:
[snip]
Such an "online book" could deal with versioning issues quite
nicely. If a specialized book writing site isn't available then
I'm sure a wiki would work.
There is the D Wiki...
http://wiki.dlang.org/The_D_Programming_Language
On Tuesday, 27 August 2013 at 22:32:39 UTC, H. S. Teoh wrote:
On Wed, Aug 28, 2013 at 12:24:20AM +0200, JS wrote:
On Tuesday, 27 August 2013 at 21:30:53 UTC, H. S. Teoh wrote:
[...]
>One example of this is the recent implementation of templated
>manifest constants. What *used* to be recommende
On Wed, Aug 28, 2013 at 12:24:20AM +0200, JS wrote:
> On Tuesday, 27 August 2013 at 21:30:53 UTC, H. S. Teoh wrote:
[...]
> >One example of this is the recent implementation of templated
> >manifest constants. What *used* to be recommended practice is to
> >write:
> >
> > template hasLength(T)
On Tuesday, 27 August 2013 at 21:30:53 UTC, H. S. Teoh wrote:
On Tue, Aug 27, 2013 at 10:59:40PM +0200, JS wrote:
There seems to be a lot of stuff D can do but no best
practices for
optimal code(performance or safety).
Someone should write a book about it!
I think we're aware of that. :) The
I'm almost done with a script to generate the zip releases (plus 7z and
OS-specific releases), but I've hit a few things that are blocking me
from getting through much more of the final mile, so I wanted to ping
them here in case anyone can help:
http://d.puremagic.com/issues/show_bug.cgi?id=10906
On Wed, Aug 28, 2013 at 01:02:27AM +0400, Dmitry Olshansky wrote:
> 28-Aug-2013 00:41, H. S. Teoh пишет:
> >On Wed, Aug 28, 2013 at 12:24:43AM +0400, Dmitry Olshansky wrote:
> >>27-Aug-2013 18:25, H. S. Teoh пишет:
> >>>On Tue, Aug 27, 2013 at 04:01:57PM +0400, Dmitry Olshansky wrote:
> >>
> >>>
>
On 8/27/13, "@puremagic.com <"\"Luís".Marques"> wrote:
> // Not OK
> int foo(int x, int y = x)
> {
> return x*y;
> }
Personally I think a much more useful feature would be (and this
doesn't block this feature but it's related to default arguments):
struct S
{
void
On Tue, Aug 27, 2013 at 10:59:40PM +0200, JS wrote:
> There seems to be a lot of stuff D can do but no best practices for
> optimal code(performance or safety).
>
> Someone should write a book about it!
I think we're aware of that. :) The problem is, nobody has stepped up to
the plate to far.
As
On 08/27/2013 09:56 PM, Walter Bright wrote:>
No reason. It simply never occurred to anyone. ...
It's just too easy to work around using overloads in the usual case to
be annoying enough for opening an enhancement/bug report.
I'd reject an enhancement request for this
I guess then you'll
On 8/27/2013 1:04 PM, Jonathan M Davis wrote:
I'd argue for it simply on the grounds that we try and be consistent, and
having it work with function arguments and not template arguments is arbitrary
and inconsistent. But other than that, I'm not sure that I care, as it's not
something that I've e
On 8/27/2013 1:05 PM, H. S. Teoh wrote:
TBH I've never heard of anyone wanting normal (non-template) parameters
to default to another parameter either. D is the first language I know
that has such a feature.
It was implemented because it was necessary for many templates.
On Sunday, 25 August 2013 at 10:36:19 UTC, David wrote:
I can't reproduce this.
But I recommend you to use gl3n as a submodule (if you use git)
or
include the sources directly and add the files to your
build-system.
That makes distributing easier and gets hopefully rid of this
error.
Ok. Thx
28-Aug-2013 00:41, H. S. Teoh пишет:
On Wed, Aug 28, 2013 at 12:24:43AM +0400, Dmitry Olshansky wrote:
27-Aug-2013 18:25, H. S. Teoh пишет:
On Tue, Aug 27, 2013 at 04:01:57PM +0400, Dmitry Olshansky wrote:
What if move(r2) throws? Then res1 won't get cleaned up, because r1 has
already been
There seems to be a lot of stuff D can do but no best practices
for optimal code(performance or safety).
Someone should write a book about it!
e.g., The scope(this) thread... is that something I should start
doing because it is much safer or what? A book with all the
goodies inside it would m
On Tuesday, 27 August 2013 at 19:41:08 UTC, Andrej Mitrovic wrote:
On 8/27/13, H. S. Teoh wrote:
and this is also by design.
If that can be called a design at all, it's a horrible design.
I would call it an accidental implementation detail at best! :)
It was by design, then @property was
On Wed, Aug 28, 2013 at 12:24:43AM +0400, Dmitry Olshansky wrote:
> 27-Aug-2013 18:25, H. S. Teoh пишет:
> >On Tue, Aug 27, 2013 at 04:01:57PM +0400, Dmitry Olshansky wrote:
>
> >
> >What if move(r2) throws? Then res1 won't get cleaned up, because r1 has
> >already been nulled by the move.
> >
>
27-Aug-2013 18:25, H. S. Teoh пишет:
On Tue, Aug 27, 2013 at 04:01:57PM +0400, Dmitry Olshansky wrote:
What if move(r2) throws? Then res1 won't get cleaned up, because r1 has
already been nulled by the move.
Then something is terribly wrong :)
Rule #1 of move should be is that it doesn't
27-Aug-2013 23:23, Jacob Carlborg пишет:
On 2013-08-26 18:41, Dmitry Olshansky wrote:
Looking at your current code in depth... finally. I would have a problem
starting the productive answers to the questions.
First things first - there should not be a key parameter aside from
stuff added by arc
On Tue, Aug 27, 2013 at 12:56:12PM -0700, Walter Bright wrote:
> On 8/27/2013 12:47 PM, Jonathan M Davis wrote:
> >On Tuesday, August 27, 2013 21:33:06 =?UTF-8?B?Ikx1w61z?=.Marques
> >@puremagic.com wrote:
> >>On Tuesday, 27 August 2013 at 11:09:01 UTC, bearophile wrote:
> >>>Do you have some use c
On Tuesday, August 27, 2013 12:56:12 Walter Bright wrote:
> > Not that I'm aware of. I'd file a bug (or at least an enhancement request)
> > on it on the grounds we should be consistent unless there's a good reason
> > not to be, and I'm not aware of any reason for this particular
> > inconsistency
On 8/27/2013 12:47 PM, Jonathan M Davis wrote:
On Tuesday, August 27, 2013 21:33:06 =?UTF-8?B?Ikx1w61z?=.Marques
@puremagic.com wrote:
On Tuesday, 27 August 2013 at 11:09:01 UTC, bearophile wrote:
Do you have some use cases for this?
No, not at the moment. I was just wondering if there was a
On 8/27/2013 5:45 AM, Vladimir Panteleev wrote:
Judging by the logs, that seems to have been caused by some temporary network /
server problems at StopForumSpam. The problems seemed to be constrained in the
time period between 4 and 8 AM UTC today, so the problem should be gone by now.
Let me kno
On Tuesday, August 27, 2013 21:33:06 =?UTF-8?B?Ikx1w61z?=.Marques
@puremagic.com wrote:
> On Tuesday, 27 August 2013 at 11:09:01 UTC, bearophile wrote:
> > Do you have some use cases for this?
>
> No, not at the moment. I was just wondering if there was a reason
> for what seemed an arbitrary dif
On Tue, Aug 27, 2013 at 09:40:54PM +0200, Andrej Mitrovic wrote:
> On 8/27/13, H. S. Teoh wrote:
> >> and this is also by design.
> >
> > If that can be called a design at all, it's a horrible design.
>
> I would call it an accidental implementation detail at best! :)
Let's call it an ac
On Tuesday, 27 August 2013 at 19:39:34 UTC, Andrej Mitrovic wrote:
On 8/27/13, Maxim Fomin wrote:
Let's start from basics
You've just repeated everything I've already said.
What should I tell except you are surprising of current state of
things?
On Tuesday, 27 August 2013 at 19:00:43 UTC, H. S. Teoh wrote:
On Tue, Aug 27, 2013 at 08:40:16PM +0200, Maxim Fomin wrote:
[...]
Let's start from basics:
writeln = 42;
and this is also by design.
If that can be called a design at all, it's a horrible design.
It should
be illegal, if it isn'
On 8/27/13, H. S. Teoh wrote:
>> and this is also by design.
>
> If that can be called a design at all, it's a horrible design.
I would call it an accidental implementation detail at best! :)
On 8/27/13, Maxim Fomin wrote:
> Let's start from basics
You've just repeated everything I've already said.
On 2013-08-26 18:41, Dmitry Olshansky wrote:
More a question of implementation then.
Answer to both of them - wrapping an output range in archiver and being
one for serializer. As for connection with your current API that gives
away an array - just think std.array.Appender (and a multitude more
On Tuesday, 27 August 2013 at 11:09:01 UTC, bearophile wrote:
Do you have some use cases for this?
No, not at the moment. I was just wondering if there was a reason
for what seemed an arbitrary difference between template
parameters and normal parameters.
On Tue, Aug 27, 2013 at 08:40:16PM +0200, Maxim Fomin wrote:
[...]
> Let's start from basics:
>
> writeln = 42;
>
> and this is also by design.
If that can be called a design at all, it's a horrible design. It should
be illegal, if it isn't already. It makes assignment syntax meaningless,
and is
On 8/27/2013 6:35 AM, Dmitry Olshansky wrote:
27-Aug-2013 17:33, Dmitry Olshansky пишет:
ADL has a "bug of surprise" written all over it.
*Bag.. though hardly a typo )
I think you've coined a new term!
On Tuesday, 27 August 2013 at 18:02:27 UTC, Andrej Mitrovic wrote:
I've run into a bit of an issue with UFCS today, take a look at
the
reduced test-case:
-
import std.conv;
class Label
{
// @property string text() { }
// @property void text(string nText) { }
}
void main()
{
On Monday, 26 August 2013 at 09:47:50 UTC, monarch_dodra wrote:
FYI, I tweaked my algo a bit, as the benches revealed an issue.
Please wait for a new commit before testing my code.
I tweaked the algo a bit. It now runs faster when the amount of
bits is the same as the size_t. I also renewed my
On 8/27/13, H. S. Teoh wrote:
> We have? Really? I haven't been keeping track of all the details, but
> my last impression was that we agreed that calling non-@property
> functions with a=b syntax should be illegal.
Oh, maybe you're right! I think I was confusing it with *parentheses*,
where a f
On Tue, Aug 27, 2013 at 08:02:18PM +0200, Andrej Mitrovic wrote:
[...]
> Btw, why exactly is the following allowed to compile?:
>
> -
> import std.conv;
> import std.stdio;
>
> struct S { }
>
> void main()
> {
> S s;
> writeln(s.text = "foo");
> }
> -
>
> This translates into st
Here is an old IUP wrapper in D.
https://code.google.com/p/iupd/
Zz
On Friday, 23 August 2013 at 16:26:37 UTC, Michael wrote:
On Thursday, 22 August 2013 at 21:44:57 UTC, Andrej Mitrovic
wrote:
On 8/22/13, Michael wrote:
For me it's no problem)
How are other people supposed to track bugs?
I've run into a bit of an issue with UFCS today, take a look at the
reduced test-case:
-
import std.conv;
class Label
{
// @property string text() { }
// @property void text(string nText) { }
}
void main()
{
auto label = new Label;
label.text = "My label";
assert(label
I'd like some kind of run-time-sized stack-allocated array in D,
similar to C++14:
http://blog.smartbear.com/development/a-glimpse-into-c14/
Currently in the D bugzilla I have suggested something like
dynarray, that is partially library-defined and partially
supported by the compiler. But unl
On Tuesday, 27 August 2013 at 16:59:14 UTC, monarch_dodra wrote:
On Tuesday, 27 August 2013 at 15:10:45 UTC, deadalnix wrote:
On Tuesday, 27 August 2013 at 13:51:51 UTC, monarch_dodra
wrote:
D has a way of doing things that C++ can, but usually, with a
twist that makes it safer and/or more powe
On Tuesday, 27 August 2013 at 15:10:45 UTC, deadalnix wrote:
On Tuesday, 27 August 2013 at 13:51:51 UTC, monarch_dodra wrote:
D has a way of doing things that C++ can, but usually, with a
twist that makes it safer and/or more powerful, or with some
very well thought mechanics.
In this case, i
On Tue, Aug 27, 2013 at 05:46:40PM +0200, deadalnix wrote:
> On Tuesday, 27 August 2013 at 14:26:53 UTC, H. S. Teoh wrote:
> >What if move(r2) throws? Then res1 won't get cleaned up, because r1
> >has already been nulled by the move.
> >
>
> I don't think move can throw.
Well, it's not marked not
On Tuesday, 27 August 2013 at 14:26:53 UTC, H. S. Teoh wrote:
What if move(r2) throws? Then res1 won't get cleaned up,
because r1 has
already been nulled by the move.
I don't think move can throw.
On 20 August 2013 13:03, Iain Buclaw wrote:
> Hi,
>
> Question aimed vaguely at Don.
>
> The routine paintFloatInt in ctfeexpr.c is not portable across
> compilers (gdc implements its own way of painting float<->int,
> double<->long through something other than using a union). Would it
> be poss
On Tuesday, 27 August 2013 at 13:51:51 UTC, monarch_dodra wrote:
D has a way of doing things that C++ can, but usually, with a
twist that makes it safer and/or more powerful, or with some
very well thought mechanics.
In this case, it really feels as if the whole a host of
functionality is jus
On Tuesday, 27 August 2013 at 14:13:25 UTC, Chris wrote:
Another drawback is that ranges demand a lot of boilerplate
code. If properly implemented, there is a lot of code you have
to write over and over again such as
if (isInputRange!Range && isInputRange!(ElementType!Range) &&
is(Elem
Chris:
Another drawback is that ranges demand a lot of boilerplate
code. If properly implemented, there is a lot of code you have
to write over and over again such as
if (isInputRange!Range && isInputRange!(ElementType!Range) &&
is(ElementType!(ElementType!Range) == MyType))
I don't
On Tue, Aug 27, 2013 at 04:01:57PM +0400, Dmitry Olshansky wrote:
> 27-Aug-2013 01:30, H. S. Teoh пишет:
> >On Sun, Aug 25, 2013 at 12:18:27AM +0200, Tobias Pankrath wrote:
> >>On Saturday, 24 August 2013 at 20:11:14 UTC, H. S. Teoh wrote:
> >>>How would you use RAII to solve this problem? If I hav
I had a very simple method that would read a text file, parse it
and create a lexicon of the type string[string].
public void loadLexicon(ref string[string] lex, string src)
It was high time I made the method more sophisticated and
flexible (allowing for comments in the source file, checking f
On Tuesday, 27 August 2013 at 13:35:36 UTC, Dmitry Olshansky
wrote:
27-Aug-2013 17:33, Dmitry Olshansky пишет:
27-Aug-2013 11:45, monarch_dodra пишет:
Koenig lookup in C++ ( also known as
http://en.wikipedia.org/wiki/Argument-dependent_name_lookup
), is
a mechanism that alows functions (in pa
Am 27.08.2013 15:33, schrieb Andrej Mitrovic:
On 8/27/13, Benjamin Thaut wrote:
Well, a link would have been great:
http://wiki.dlang.org/DIP45
Using export(identifier) is not going to be reliable, since chances of
clashes are high.
E.g. if libFoo uses export(Foo) and libBar also uses export
27-Aug-2013 17:33, Dmitry Olshansky пишет:
27-Aug-2013 11:45, monarch_dodra пишет:
Koenig lookup in C++ ( also known as
http://en.wikipedia.org/wiki/Argument-dependent_name_lookup ), is
a mechanism that alows functions (in particular templates) to
call a function that operates on an object of a
27-Aug-2013 11:45, monarch_dodra пишет:
Koenig lookup in C++ ( also known as
http://en.wikipedia.org/wiki/Argument-dependent_name_lookup ), is
a mechanism that alows functions (in particular templates) to
call a function that operates on an object of a specific
namespace, without having to qualif
On 8/27/13, Benjamin Thaut wrote:
> Well, a link would have been great:
>
> http://wiki.dlang.org/DIP45
Using export(identifier) is not going to be reliable, since chances of
clashes are high.
E.g. if libFoo uses export(Foo) and libBar also uses export(Foo), you
won't be able to distinguish betwe
On Tuesday, 27 August 2013 at 10:00:50 UTC, Peter Alexander wrote:
On Tuesday, 27 August 2013 at 07:45:14 UTC, monarch_dodra wrote:
I think that D's non-hijack rules are pretty sweet, but I also
think that D should apply Koenig's rules: If a template is
dependent on a parameter from a particular
On Tuesday, 27 August 2013 at 07:49:04 UTC, monarch_dodra wrote:
On the other hand, I now have to resolve a captcha for every one
of my posts :/
Judging by the logs, that seems to have been caused by some
temporary network / server problems at StopForumSpam. The
problems seemed to be constrai
On Tuesday, 27 August 2013 at 12:45:32 UTC, Vladimir Panteleev
wrote:
On Tuesday, 27 August 2013 at 07:49:04 UTC, monarch_dodra wrote:
On the other hand, I now have to resolve a captcha for every
one
of my posts :/
Judging by the logs, that seems to have been caused by some
temporary network
27-Aug-2013 01:30, H. S. Teoh пишет:
On Sun, Aug 25, 2013 at 12:18:27AM +0200, Tobias Pankrath wrote:
On Saturday, 24 August 2013 at 20:11:14 UTC, H. S. Teoh wrote:
How would you use RAII to solve this problem? If I have a class:
class C {
Resource1 res1;
Am 27.08.2013 13:28, schrieb deadalnix:
On Tuesday, 27 August 2013 at 10:16:24 UTC, Benjamin Thaut wrote:
Well, a link would have been great:
http://wiki.dlang.org/DIP45
I don't think that is the way to go.
We need a way to mark a module as being an "header" import for a shared
lib.
With th
On Tuesday, 27 August 2013 at 10:16:24 UTC, Benjamin Thaut wrote:
Well, a link would have been great:
http://wiki.dlang.org/DIP45
I don't think that is the way to go.
We need a way to mark a module as being an "header" import for a
shared lib.
With that solution, you'll ends up duplicating
Luís Marques:
Is there a reason why template parameters can default to other
template parameters, but not regular parameters? For instance:
// OK
int foo(int x, int y = x)()
{
return x*y;
}
// Not OK
int foo(int x, int y = x)
{
return x*y;
}
Wh
Well, a link would have been great:
http://wiki.dlang.org/DIP45
The current behaviour of export is not sufficient to create a shared
runtime on windows. Its alos not working very well in a few other cases.
For background information please read the links provided in the DIP.
This DIP tries to solve the problem by imitating the proven preprocessor
techniques
On Tuesday, 27 August 2013 at 07:45:14 UTC, monarch_dodra wrote:
I think that D's non-hijack rules are pretty sweet, but I also
think that D should apply Koenig's rules: If a template is
dependent on a parameter from a particular module (say "a"),
then
the functions inside that module should al
On Monday, 26 August 2013 at 21:31:40 UTC, H. S. Teoh wrote:
But don't you still need to manually cleanup in the case of ctor
failure? AFAIK, the dtor is not invoked on the
partially-constructed
object if the ctor throws.
I didn't knew this. You are right, that this brakes my RAII
scheme a
On Monday, 26 August 2013 at 18:33:55 UTC, Zach the Mystic wrote:
On Monday, 26 August 2013 at 09:29:18 UTC, Chris wrote:
I don't agree. I first used D exactly because it is an
"all-rounder". For me built-in UTF support was as important a
factor as native machine code (performance). The reasons
On Tuesday, 27 August 2013 at 08:39:52 UTC, Peter Alexander wrote:
On Tuesday, 27 August 2013 at 08:37:24 UTC, Peter Alexander
wrote:
I'm not sure what the resolution of this is. Anti-hijacking is
import
*important :)
We should be able to inject import into templates.
On Tuesday, 27 August 2013 at 08:37:24 UTC, Peter Alexander wrote:
I'm not sure what the resolution of this is. Anti-hijacking is
import
*important :)
On Tuesday, 27 August 2013 at 07:54:06 UTC, Walter Bright wrote:
On 8/27/2013 12:45 AM, monarch_dodra wrote:
The root reason for this mechanism, is that it allows writing
templated functions that can operate on objects from any
namespace.
I believe the root reason was so that operator overload
On Tuesday, 27 August 2013 at 07:54:06 UTC, Walter Bright wrote:
On 8/27/2013 12:45 AM, monarch_dodra wrote:
The root reason for this mechanism, is that it allows writing
templated functions that can operate on objects from any
namespace.
I believe the root reason was so that operator overload
On 8/27/2013 12:45 AM, monarch_dodra wrote:
The root reason for this mechanism, is that it allows writing
templated functions that can operate on objects from any
namespace.
I believe the root reason was so that operator overloads would work when the
rvalue was the class type. (In C++ you have
Koenig lookup in C++ ( also known as
http://en.wikipedia.org/wiki/Argument-dependent_name_lookup ), is
a mechanism that alows functions (in particular templates) to
call a function that operates on an object of a specific
namespace, without having to qualify the namespace of the
function.
The roo
On Monday, 26 August 2013 at 16:22:15 UTC, Vladimir Panteleev
wrote:
On Monday, 26 August 2013 at 14:20:58 UTC, Tyler Jameson Little
wrote:
I just tried to post a reply to Dicebot on the announce
subforum through the web ui and I got a reCAPTCHA (first time
ever) and I could not pass the CAPTCH
80 matches
Mail list logo