On 10/19/2010 09:06 PM, Walter Bright wrote:
bearophile wrote:
The point I was trying to express is that from what I have seen people
are
able to learn to program Python (this means quite more than just the
syntax)
in *much* less time it takes to learn C++/D. And this has precise causes.
Time
On 11/23/2010 01:17 PM, Kagamin wrote:
void func(string[] strings) {
string[] result;
foreach (auto s ; strings) {
if (s != "") {
writefln("found: %s", s);
result ~= s; }}}
This takes too much vertical space and should be rewritten to:
void fu
On 11/23/2010 11:18 PM, spir wrote:
Seriously, I fail to see how braces one their own line help visually catching
code structure
I agree that brace alignment has little to do with catching code
structure. It is more about symmetry. And visual symmetry of braces in
code is a matter of prefere
On 11/24/2010 07:06 AM, Jonathan M Davis wrote:
On Tuesday 23 November 2010 20:43:34 dsimcha wrote:
I was browsing through druntime's lifetime.d for an unrelated reason and I
noticed that, when an array is copied for the purpose of appending to it,
the postblits are not called on the new array i
On 11/29/2010 08:58 PM, Steven Schveighoffer wrote:
Most likely not. How do you say that the 'draw' function switches the
widget to a different parameterized type? With const, you can just slap
a const on the end of the function.
Here is some example of what I mean:
class Widget
{
mutable
On 11/29/2010 11:22 PM, Max Samukha wrote:
On 11/29/2010 08:58 PM, Steven Schveighoffer wrote:
Most likely not. How do you say that the 'draw' function switches the
widget to a different parameterized type? With const, you can just slap
a const on the end of the function.
Here is so
On 11/29/2010 11:39 PM, Steven Schveighoffer wrote:
On Mon, 29 Nov 2010 16:22:55 -0500, Max Samukha
wrote:
On 11/29/2010 08:58 PM, Steven Schveighoffer wrote:
Most likely not. How do you say that the 'draw' function switches the
widget to a different parameterized type? With cons
On 11/30/2010 02:35 AM, Walter Bright wrote:
Fawzi Mohamed wrote:
logical const is useful for lazy functions and memoization, and if
implemented correctly it is perfectly safe.
As I said in an older discussions, to have it with the current system
all that is needed is some guarantees that the co
On 11/30/2010 01:54 AM, critic wrote:
It has been many times said that the template T!X syntax optimization is a very
lousy hack with problems. In their arrogance, the authors completely ignore all
criticism.
Every optimization comes with problems. What problems does the T!X
optimization hav
On 11/30/2010 09:30 AM, Jesse Phillips wrote:
This came up in discussion and I think the behavior is safe and usable when
wanting to change class data in a const function.
http://article.gmane.org/gmane.comp.lang.d.general/43476
One limitation is that value types declared as Mutable (Mutable!(
On 11/30/2010 05:39 PM, Andrei Alexandrescu wrote:
On 11/30/10 5:25 AM, Max Samukha wrote:
On 11/30/2010 02:35 AM, Walter Bright wrote:
Fawzi Mohamed wrote:
logical const is useful for lazy functions and memoization, and if
implemented correctly it is perfectly safe.
As I said in an older
On 12/06/2010 10:47 PM, Mike Parker wrote:
On 12/7/2010 2:10 AM, Haruki Shigemori wrote:
(2010/12/06 16:59), Denis Koroskin wrote:
Because D runtime doesn't know about the newly created thread, and
static constructors weren't called. Try calling the following in your
callbacks:
if (Thread.getT
On 12/10/2010 10:58 PM, Andrei Alexandrescu wrote:
On 12/10/10 12:46 PM, Steven Schveighoffer wrote:
On Mon, 06 Dec 2010 08:34:20 -0500, Steven Schveighoffer
wrote:
On Sun, 05 Dec 2010 09:18:13 -0500, Andrei Alexandrescu
wrote:
On 12/5/10 12:04 AM, Steven Schveighoffer wrote:
I'm totally
On 12/14/2010 06:09 PM, Andrei Alexandrescu wrote:
On 12/14/10 10:08 AM, Steven Schveighoffer wrote:
On Tue, 14 Dec 2010 10:47:05 -0500, Andrei Alexandrescu
wrote:
On 12/14/10 7:33 AM, biozic wrote:
I have a question about this and some pieces of code in the standard
library, notably std.
On 12/18/2010 10:03 PM, Nick Sabalausky wrote:
"Caligo" wrote in message
news:mailman.5.1292651710.4588.digitalmar...@puremagic.com...
IMO there is no honor in game development as it contributes nothing to
society. I've rarely played any,
I gotta jump on this as being a giant load of preten
On 12/19/2010 06:35 PM, Ary Borenszweig wrote:
On 12/19/2010 01:21 PM, Andrei Alexandrescu wrote:
On 12/19/10 9:32 AM, Ary Borenszweig wrote:
I have this code:
---
import std.stdio;
int foobar(int delegate(int) f) {
return f(1);
}
int foobar2(string s)() {
int x = 1;
mixin("return " ~ s ~ ";
On 12/20/2010 08:43 AM, Walter Bright wrote:
bearophile wrote:
Many games are like drugs.
Not for me. I get bored with games. You don't get bored with drugs.
You didn't play StarCraft when you were a teenager.
On 12/19/2010 09:48 PM, Nick Sabalausky wrote:
Assuming you meant that as a sarcastic counter-example: There may be ways in
which they make life suck less, but *overall*, they're generally considered
to make life suck *more*. So the "make life suck less" rule still holds.
Although, if you me
On 12/24/2010 07:18 AM, Andrei Alexandrescu wrote:
What the... I didn't know you can do that. Thanks for the tip!
Andrei
It's great we can do that. Though it doesn't make D's compile-time
introspection much easier to work with. For example, look how we get
overloads of a function in the cur
On 12/27/2010 07:09 PM, Andrei Alexandrescu wrote:
On 12/27/10 2:19 AM, Gour wrote:
On Sun, 26 Dec 2010 14:33:25 -0600
"Seth" == Seth Hoenig wrote:
Seth> This is certainly a personal preference, but I would add static
Seth> typing to that list.
+1
Conversely, I wonder how we can improve th
On 12/29/2010 02:38 AM, Robert Jacques wrote:
On Tue, 28 Dec 2010 04:49:54 -0700, Max Samukha
wrote:
Another QVariant feature I would like to see in Variant is a
constructor taking the type descriptor and a void pointer to the
value. For example, it is needed for constructing Variants from
On 12/30/2010 07:08 PM, Steven Schveighoffer wrote:
auto opAdd(Foo other)
vs.
auto opBinary(string op)(Foo other) if (op == "+")
For the latter not to look so intimidating, it can be shortened to:
auto opBinary(string op : "+")(Foo other)
On 12/31/2010 02:44 AM, Walter Bright wrote:
Andrei Alexandrescu wrote:
I agree there's an issue here, but not only with floating point numbers:
void fun(long);
void fun(ulong);
...
fun(2); // whaa?
That's a feature, not a bug.
void foo(string s);
void foo(wstring s);
foo("whoa");
This fa
On 12/31/2010 04:47 AM, Andrej Mitrovic wrote:
On 12/31/10, Manfred_Nowak wrote:
Andrej Mitrovic wrote:
"Overload sets can be merged with an alias declaration"
[...]
That's not the point. The point is it works with a long variable, but
not with a long literal.
???
According to the specs
On 01/05/2011 11:21 AM, Lars T. Kyllingstad wrote:
On Tue, 04 Jan 2011 17:06:45 -0600, Andrei Alexandrescu wrote:
On 1/4/11 4:49 PM, %u wrote:
There's still the risk of keeping multiple hashes. Consider:
ulong fun(ulong n) { ... }
alias memoize!fun mfun;
mfun(5); // creates hash ulong[in
On 01/05/2011 12:24 PM, Lars T. Kyllingstad wrote:
On Wed, 05 Jan 2011 12:07:50 +0200, Max Samukha wrote:
On 01/05/2011 11:21 AM, Lars T. Kyllingstad wrote:
On Tue, 04 Jan 2011 17:06:45 -0600, Andrei Alexandrescu wrote:
On 1/4/11 4:49 PM, %u wrote:
There's still the risk of ke
On 01/05/2011 02:12 PM, Lars T. Kyllingstad wrote:
On Wed, 05 Jan 2011 13:40:05 +0200, Max Samukha wrote:
On 01/05/2011 12:24 PM, Lars T. Kyllingstad wrote:
On Wed, 05 Jan 2011 12:07:50 +0200, Max Samukha wrote:
On 01/05/2011 11:21 AM, Lars T. Kyllingstad wrote:
On Tue, 04 Jan 2011 17:06
Some of us who have the knack of writing metaprograms in D know that
many algorithms can be implemented with both recursive templates and
CTFE. A simple example is map:
Recursive template instantiation:
template staticMap(alias pred, A...)
{
static if (A.length)
alias TypeTuple!(pr
On 01/06/2011 07:49 PM, Max Samukha wrote:
template staticMap(alias pred, A...)
{
static if (A.length)
alias TypeTuple!(pred!(A[0]), staticMap!(A[1..$])) staticMap;
}
Should be:
template staticMap(alias pred, A...)
{
static if (A.length)
alias TypeTuple!(pred!(A[0]), staticMap!(A
On 01/06/2011 09:28 PM, Robert Clipsham wrote:
Put each of those implementations in its own file, then call it several
times. Look at the binary size for each implementation, also run
`strings ctfeTest` if you're on a *nix. This should give you your answer :)
The problem is they are not easy
On 01/07/2011 03:12 PM, Don wrote:
Max Samukha wrote:
On 01/06/2011 09:28 PM, Robert Clipsham wrote:
Put each of those implementations in its own file, then call it several
times. Look at the binary size for each implementation, also run
`strings ctfeTest` if you're on a *nix. This s
On 01/06/2011 09:38 PM, Walter Bright wrote:
http://www.drdobbs.com/blog/archives/2011/01/patterns_of_bug.html
(dedicated to bearophile!)
Anyone want to post it on reddit?
Good points. However, computer hardware analogies are a bit outdated.
For example, USB is prevalent nowadays. You connec
On 01/11/2011 04:34 PM, Ary Borenszweig wrote:
Oh, one more thing: can the names be consistent?
inpattern
countChars
expandtabs
chompPrefix
toupper
toupperInPlace ??
If this can't be done for backwards compatibility maybe you can make alias for
the
previous ones.
Also:
stripl
stripr
strip
S
On 01/11/2011 05:36 PM, Ary Borenszweig wrote:
Yes, what I meant was that the names are stripl and stripr yet the description
of
those functions are strip leading and strip trailing... at least put strip left
and string right on the description so it matches the names.
Sorry for misunderstandi
On 01/11/2011 09:42 PM, Walter Bright wrote:
Ary Borenszweig wrote:
Why care where they come from? Why not make them intuitive? Say, like,
"Always
camel case"?
Because people are used to those names due to their wide use. It's the
same reason that we still use Qwerty keyboards.
We should be
On 01/11/2011 08:18 PM, Nick Sabalausky wrote:
"Max Samukha" wrote in message
news:ighvca$ap...@digitalmars.com...
On 01/11/2011 05:36 PM, Ary Borenszweig wrote:
Yes, what I meant was that the names are stripl and stripr yet the
description of
those functions are strip leading
On 01/22/2011 02:16 AM, Andrei Alexandrescu wrote:
On 1/21/11 4:49 PM, Jonathan M Davis wrote:
On Friday, January 21, 2011 13:30:11 Ali Çehreli wrote:
Andrei Alexandrescu wrote:
> iswhite
I like separating is with an underscore, like most coding styles do:
is_whitespace
Warm and fuzzy... :)
On 01/30/2011 07:17 PM, Andrej Mitrovic wrote:
The unittest topic is about to get derailed so I want to continue this silly
discussion here.
Wheres Nick? I want to see the CRT vs LCD discussion heated up again with
Andrei claiming that LCDs are so Godlike but yet claims 80 columns is enough
f
On 02/04/2011 05:07 AM, Walter Bright wrote:
Jonathan M Davis wrote:
I only brought up Tango in the first place to point out that it is a
goal of the new std.xml to at least come close to Tango's performance
in parsing XML, because Tango's XML parser is very fast.
The way to get a high perform
On 02/04/2011 11:24 AM, Walter Bright wrote:
Max Samukha wrote:
.NET and Qt do have slices of some kind:
http://msdn.microsoft.com/en-us/library/1hsbd92d.aspx
http://doc.qt.nokia.com/latest/qstringref.html#details
I am not sure whether their XML libraries use those.
.net's slice
On Tuesday, 6 November 2012 at 19:18:39 UTC, Walter Bright wrote:
For User Defined Attributes.
In the north corner we have the current champon:
---
[ ArgumentList ]
Pros:
precedent with C#
looks nice
Cons:
not so greppable
parsing ambiguity with [array literal].func();
On Monday, 26 November 2012 at 16:37:08 UTC, Manu wrote:
template isThing( alias symbol, A )
{
enum isThing = false;
}
This template works in most contexts:
int x;
struct S {}
pragma(msg, isThing!x);
pragma(msg, isThing!S);
But this fails:
pragma(msg, isThing!int);
Why does it fail on a ba
On Monday, 26 November 2012 at 19:59:42 UTC, Walter Bright wrote:
On 11/27/2012 5:52 AM, David Nadlinger wrote:
I agree, and if I remember previous discussions on the subject
correctly, it seems like only Walter is in favor of upholding
the
current restrictions of "alias" parameters to symbols.
On Tuesday, 27 November 2012 at 21:26:47 UTC, Walter Bright wrote:
On 11/28/2012 8:23 AM, Walter Bright wrote:
It is unbelievably frustrating for people to have their code
break with
each new release, have older projects all invalidated, with
few willing
to do the maintenance work to bring the
On Wednesday, 28 November 2012 at 08:40:32 UTC, SiegeLord wrote:
On Wednesday, 28 November 2012 at 08:01:02 UTC, Jacob Carlborg
wrote:
I think all this is mostly a project management issue. I don't
think the breaking changes in them self is the biggest problem.
After years of using D1 and D2
On Wednesday, 28 November 2012 at 12:53:34 UTC, Walter Bright
wrote:
On 11/28/2012 11:34 P I come here on a regular basis to see if
> the issues hampering soM, Max Samukha wrote:
I have a different concession.me long-overdue work that is
important to me (and
arguably to the community) have b
On Tuesday, 27 November 2012 at 16:19:59 UTC, Manu wrote:
On 27 November 2012 17:49, Gor Gyolchanyan
wrote:
Can you implement this use case?
Have classes mix in something,, which will register them in a
single
place, which can later suppl the registered classes as a type
tuple.
I don't d
On Tuesday, 27 November 2012 at 21:48:52 UTC, Walter Bright wrote:
On 11/28/2012 3:59 AM, David Nadlinger wrote:
On Tuesday, 27 November 2012 at 15:49:45 UTC, Gor Gyolchanyan
wrote:
Can you implement this use case?
Have classes mix in something,, which will register them in a
single
place,
wh
On Wednesday, 28 November 2012 at 15:54:52 UTC, Manu wrote:
module a;
import b;
mixin RegisterModule;
module b;
import a;
mixin RegisterModule;
Certainly a potential problem, but I've set up my code such
that these
static constructors themselves have no external dependencies,
and
initiali
On Wednesday, 28 November 2012 at 19:57:34 UTC, Manu wrote:
Well fortunately that hasn't happened yet... That does worry me
though. I
can't imagine a work-around if that comes up.
Just a random thought: what if the compiler didn't check cycles
for modules that define only static ctors attr
On Wednesday, 28 November 2012 at 20:14:52 UTC, Jacob Carlborg
wrote:
On 2012-11-28 20:57, Manu wrote:
Well fortunately that hasn't happened yet... That does worry
me though.
I can't imagine a work-around if that comes up.
std.stdio uses an ugly workaround. It has an extern(C) function
whic
On Wednesday, 28 November 2012 at 22:46:47 UTC, Walter Bright
wrote:
On 11/29/2012 3:23 AM, Max Samukha wrote:
That is a problem for anyone who builds a library for general
use.
I don't see how any library for general use would be importing
user modules, so there shouldn't be
On Wednesday, 28 November 2012 at 22:51:30 UTC, Walter Bright
wrote:
On 11/29/2012 7:11 AM, Max Samukha wrote:
Just a random thought: what if the compiler didn't check
cycles for
modules that define only static ctors attributed with
@system/@trusted?
It's a good idea to have a way
On Wednesday, 28 November 2012 at 23:41:37 UTC, Timon Gehr wrote:
On 11/28/2012 11:46 PM, Walter Bright wrote:
On 11/29/2012 3:23 AM, Max Samukha wrote:
That is a problem for anyone who builds a library for general
use.
I don't see how any library for general use would be importing
On Thursday, 29 November 2012 at 07:37:31 UTC, Jacob Carlborg
wrote:
On 2012-11-29 01:16, deadalnix wrote:
Can someone remember me why this ended up in master ? This
feature is
clearly not ready.
Because that's what Walter do, committing new features to the
master branch willy nilly.
I wa
On Thursday, 29 November 2012 at 02:34:11 UTC, Walter Bright
wrote:
For discussion:
Cyclical Imports
Problem:
a.d
module a;
import b;
static this () { ... }
b.d
module b;
import a;
static this() { ... }
-
Static constructors for a module
On Thursday, 29 November 2012 at 11:39:20 UTC, Paulo Pinto wrote:
On Thursday, 29 November 2012 at 03:19:55 UTC, Andrei
Alexandrescu wrote:
On 11/28/12 9:34 PM, Walter Bright wrote:
For discussion:
[snip]
I'd say we better finish const, immutable, and shared first.
Andrei
+1
Fully agree.
On Thursday, 29 November 2012 at 14:17:40 UTC, Andrei
Alexandrescu wrote:
I think this entire approach is unprincipled (aside from
solving a problem that's not urgent and not important).
Could you explain how did you determine its urgency and
importance please?
Andrei
On Thursday, 29 November 2012 at 15:18:11 UTC, Paulo Pinto wrote:
On Thursday, 29 November 2012 at 12:04:28 UTC, Max Samukha
wrote:
On Thursday, 29 November 2012 at 11:39:20 UTC, Paulo Pinto
wrote:
On Thursday, 29 November 2012 at 03:19:55 UTC, Andrei
Alexandrescu wrote:
On 11/28/12 9:34 PM
On Thursday, 29 November 2012 at 15:23:32 UTC, Andrei
Alexandrescu wrote:
On 11/29/12 10:17 AM, Max Samukha wrote:
On Thursday, 29 November 2012 at 14:17:40 UTC, Andrei
Alexandrescu wrote:
I think this entire approach is unprincipled (aside from
solving a
problem that's not urgent an
On Thursday, 29 November 2012 at 17:35:43 UTC, Andrei
Alexandrescu wrote:
On 11/29/12 12:07 PM, Max Samukha wrote:
On Thursday, 29 November 2012 at 15:23:32 UTC, Andrei
Alexandrescu wrote:
On 11/29/12 10:17 AM, Max Samukha wrote:
On Thursday, 29 November 2012 at 14:17:40 UTC, Andrei
On Monday, 10 December 2012 at 22:15:09 UTC, Walter Bright wrote:
On 12/10/2012 1:57 PM, Adam D. Ruppe wrote:
On Monday, 10 December 2012 at 21:50:47 UTC, Walter Bright
wrote:
Why? (It's being heavily used by some people.)
I'm *really* looking forward to UDAs in the next release. Even
if the
On Monday, 10 December 2012 at 22:56:45 UTC, Walter Bright wrote:
On 12/10/2012 2:20 PM, Max Samukha wrote:
On Monday, 10 December 2012 at 22:15:09 UTC, Walter Bright
wrote:
On 12/10/2012 1:57 PM, Adam D. Ruppe wrote:
On Monday, 10 December 2012 at 21:50:47 UTC, Walter Bright
wrote:
Why
On Tuesday, 11 December 2012 at 09:10:30 UTC, Jacob Carlborg
wrote:
On 2012-12-11 00:19, Max Samukha wrote:
Probably it should. Single parametrized attributes (in the
form of
templates or CTFE constructors) are very likely to occur as
often (if
not more often) as parameterless (as they do in
On Wednesday, 12 December 2012 at 02:44:42 UTC, Walter Bright
wrote:
UDAs are a primo example of this.
OT: Why those are not allowed on module decls and local decls? We
can't use UDAs on decls in unittest blocks. We can't use a UDA to
mark a module reflectable, can't put an attribute on a
"v
On Wednesday, 12 December 2012 at 08:00:09 UTC, Walter Bright
wrote:
On 12/11/2012 11:53 PM, Walter Bright wrote:
On 12/11/2012 11:47 PM, Han wrote:
Walter Bright wrote:
ML has been around for 30-40 years, and has failed to catch
on.
Isn't D on that same historical path?
Many languages wa
On Wednesday, 12 December 2012 at 22:19:54 UTC, js.mdnq wrote:
Also, I initially tried to do
B!(A.b1.offsetof) b1;
a'la
http://forum.dlang.org/thread/mailman.2627.1355335532.5162.digitalmar...@puremagic.com
but dmd 2.060 crashes, which is why I moved on to using a
static if.
That's
On Thursday, 13 December 2012 at 00:02:01 UTC, js.mdnq wrote:
Half done? Has it even been implemented at all?
http://dlang.org/class.html#nested
It is implemented for nested classes but not structs.
In any case my method seems to provide a solution to the
problem in the mean time. I have
On Tuesday, 18 December 2012 at 10:48:07 UTC, Don Clugston wrote:
Congratulations, Bugbear!
Congrats, bearophile! (What a loser I am...)
On Tuesday, 18 December 2012 at 17:31:49 UTC, jerro wrote:
I noticed that this doesn't work with the latest DMD from
github:
import std.typetuple;
struct Foo{}
struct Bar{}
alias TypeTuple!(Foo, Bar) FooBar;
@FooBar
void foo(){}
pragma(msg, __traits(getAttributes, foo));
When trying to com
On Tuesday, 18 December 2012 at 18:11:37 UTC, Walter Bright wrote:
An interesting datapoint in regards to bytecode is Javascript.
Note that Javascript is not distributed in bytecode form. There
is no Javascript VM. It is distributed as source code.
Sometimes, that source code is compressed and
On Tuesday, 18 December 2012 at 18:22:40 UTC, Max Samukha wrote:
Actually, they call JavaScript an IL for the next ten years.
s/an/the
On Wednesday, 19 December 2012 at 07:22:45 UTC, Walter Bright
wrote:
On 12/18/2012 11:04 PM, Rob T wrote:
I'm not claiming to be an expert in this area either, however
it seems obvious
that there are significant theoretical and practical
advantages with using the
bytecode concept.
Evidently
On Wednesday, 19 December 2012 at 08:45:20 UTC, Walter Bright
wrote:
On 12/19/2012 12:19 AM, Max Samukha wrote:
Evidently you've dismissed all of my posts in this thread on
that topic :-)
As you dismissed all points in favor of bytecode.
And I gave detailed reasons why.
Such as it be
On Thursday, 20 December 2012 at 21:30:44 UTC, deadalnix wrote:
On Thursday, 20 December 2012 at 01:41:38 UTC, Walter Bright
wrote:
Not exactly, I argue that having a bytecode standard is
useless. How a compiler works internally is fairly irrelevant.
Note that in the first place, bytecode disc
On Friday, 21 December 2012 at 10:30:21 UTC, Walter Bright wrote:
On 12/21/2012 2:13 AM, Max Samukha wrote:
What Walter is wrong about is that bytecode is entirely
pointless.
I'll bite. What is its advantage over source code?
It is not about bytecode vs source code. It is about a c
On Friday, 21 December 2012 at 11:00:01 UTC, Max Samukha wrote:
On Friday, 21 December 2012 at 10:30:21 UTC, Walter Bright
wrote:
On 12/21/2012 2:13 AM, Max Samukha wrote:
What Walter is wrong about is that bytecode is entirely
pointless.
I'll bite. What is its advantage over source
On Friday, 21 December 2012 at 17:08:28 UTC, Simen Kjaeraas wrote:
On 2012-00-21 12:12, Max Samukha wrote:
On Friday, 21 December 2012 at 10:30:21 UTC, Walter Bright
wrote:
On 12/21/2012 2:13 AM, Max Samukha wrote:
What Walter is wrong about is that bytecode is entirely
pointless.
I
On Friday, 4 January 2013 at 15:45:21 UTC, Philippe Sigaud wrote:
My own rapid reading tells me we will rapidly need good tuple
manipulations templates in Phobos.
s/we will rapidly need/we have needed for years
On Friday, 4 January 2013 at 16:04:59 UTC, Philippe Sigaud wrote:
So, I'm testing how to transfer UDA from one symbol to another.
```
auto transferAttributes(alias origin, To)(To t)
{
@(__traits(getAttributes, origin)) To temp = t;
pragma(msg, __traits(getAttributes, temp));
return t
On 11/25/2011 02:27 PM, Andrei Alexandrescu wrote:
On 11/25/11 2:13 AM, Jude Young wrote:
Is there an easy way to turn D style (string[] args) into C style?
Hm, I expected this would work:
extern(C) int __argc;
extern(C) char** __argv;
The symbols do exist at least on OSX (no linker error) b
On 11/25/2011 05:27 PM, Andrei Alexandrescu wrote:
On 11/25/11 8:55 AM, Max Samukha wrote:
__gshared extern extern(C) int __argc;
That doesn't link.
Andrei
It links correctly on windows for me and linux doesn't have the
variables defined. Are you sure they are not windows-specific?
On 11/25/2011 06:52 PM, Andrei Alexandrescu wrote:
As I wrote, on OSX the definitions do link so they exist.
Andrei
Are you defining the variables or referencing them?
extern(C) int x; means definition and of course it will link because it
is you who defines the variable.
extern extern(C)
On 11/25/2011 09:34 PM, Andrei Alexandrescu wrote:
Oh, I see. Thanks for enlightening me. So apparently I defined those
variables...
Andrei
Could you or Walter add some information about extern vs extern(C) to
the docs?
On 11/26/2011 10:01 PM, Brad Roberts wrote:
On Saturday, November 26, 2011 5:40:27 AM, Max Samukha wrote:
On 11/25/2011 09:34 PM, Andrei Alexandrescu wrote:
Oh, I see. Thanks for enlightening me. So apparently I defined those
variables...
Andrei
Could you or Walter add some information
On 11/28/2011 11:44 AM, so wrote:
On Mon, 28 Nov 2011 11:42:24 +0200, Caligo wrote:
On Sun, Nov 27, 2011 at 6:44 PM, Alexey Veselovsky <
alexey.veselov...@gmail.com> wrote:
I'm trying to switch from C++ to D. But I can't find some things that
I love in C++. For example in C++ I can separate
On 11/28/2011 02:29 PM, so wrote:
On Mon, 28 Nov 2011 13:58:25 +0200, Max Samukha wrote:
How would you write libraries?
The way they do, for example, in C# - interface definitions are stored
in the library, no need for separate headers.
Are we talking about the same thing?
Something like
On 11/28/2011 03:52 PM, so wrote:
On Mon, 28 Nov 2011 15:34:19 +0200, Max Samukha wrote:
No, it has nothing to do with the IDE. The article describes a visual
tool for viewing meta-data stored in a .NET binary. You don't have to
use it.
Specially for you, die-hard IDE haters, this is h
On 11/28/2011 04:05 PM, so wrote:
For the second part if library writer changes anything with
"implementation", that would not affect the user.
In your case it does, because there is no distinction between
specification and implementation
There is, but the specification is bundled with the impl
On 11/28/2011 06:07 PM, Maxim Fomin wrote:
In conclusion, I find D module support the worst one.
Sad but true.
On 12/12/2011 12:33 AM, deadalnix wrote:
I think you misunderstood the idea. The point was to remove constness of
something passed by value, as long as it possible (native types, pointer
(but not pointee), slices (but not what is in the slice), structs as
long as they have no indirection in them)
On 12/11/2011 11:24 PM, Jonathan M Davis wrote:
On Sunday, December 11, 2011 14:54:27 Tobias Pankrath wrote:
Specifically:
"Properties should behave as if they are fields; if the method cannot,
it should not be changed to a property.
Methods are better than properties in the following situation
On 12/28/2011 07:15 PM, deadalnix wrote:
The syntax to do such a thing is more verbose in javascript. So
definitively, this is a nice syntax, but this isn't that ground
breaking, and this isn't even required for people to use this type of
constructs.
People keep complaining about the verbosit
On 12/29/2011 01:49 AM, Adam D. Ruppe wrote:
On Wednesday, 28 December 2011 at 22:57:29 UTC, bearophile wrote:
(while I have not written a significant amount of functional-style
code in Javascript)
It looks fine if you use named functions or a little whitespace
around the literals (same as D!)
On 12/29/2011 11:16 AM, Walter Bright wrote:
http://pastebin.com/AtuzJqh0
He will soon realize that he wants an earthborn language rather than the
one of God :)
On Monday, 16 April 2012 at 20:42:19 UTC, Timon Gehr wrote:
This could be fixed by introducing a simple language feature
that allows a supertype to specify mixin templates that are
'inherited' by all subtypes.
Similar proposals have been made in the past
(http://www.digitalmars.com/d/archi
On Saturday, 28 April 2012 at 06:03:54 UTC, Mehrdad wrote:
You expected that to work?
Uhm, why not?
template
struct F
{
F > f() { return F >(); }
};
int main()
{
F().f().f().f().f().f(); // etc.
return 0;
}
dmd is not smart enough to avoid recursion by treating f as a
templated f
On Saturday, 28 April 2012 at 09:40:49 UTC, Timon Gehr wrote:
On 04/28/2012 09:46 AM, Max Samukha wrote:
On Saturday, 28 April 2012 at 06:03:54 UTC, Mehrdad wrote:
You expected that to work?
Uhm, why not?
template
struct F
{
F > f() { return F >(); }
};
int main()
{
F().f().f()
On Friday, 4 January 2013 at 17:11:04 UTC, Philippe Sigaud wrote:
The declaration. The type, I guess I'd use an alias. Though, I
guess the
alias syntax limitations would probably forbid that.
So yes, the local declaration is attributed, that works. How do
I propagate
the attribute to the retu
On Friday, 4 January 2013 at 20:58:42 UTC, Walter Bright wrote:
On 1/4/2013 12:49 PM, Philippe Sigaud wrote:
Is that a bug or are module declarations not 'real'
declarations?
Module declarations aren't declarations.
They conceptually are.
1 - 100 of 427 matches
Mail list logo