Re: [Slight OT] TDPL in Russia

2010-09-01 Thread Kagamin
Steven Schveighoffer Wrote: > This is all based on your opinion. And unfortunately it's all wrong -- I > know what is good and what is bad, you should just stop posting. > We both know, what is good, so we both should stop posting.

Re: Bug 3999 and 4261

2010-09-01 Thread Kagamin
bearophile Wrote: >But enums are not integers ?? Where did you get it?

Reporting TDPL bugs in Bugzilla

2010-09-01 Thread Don
To everyone reporting inconsistencies between Andrei's book and the compiler -- please include TDPL or [tdpl] in the bug title, to make it easier to search for them. These bugs have high priority. Also note that all new bugs should have version marked as "D1", "D2" or "D1&D2", depending on whe

Re: Bug 3999 and 4261

2010-09-01 Thread Rainer Deyke
On 8/31/2010 19:46, bearophile wrote: > But you can use const for constants that are known at run-time only. > While you can't use enum for constant known at run-time. In C++, const is used for both run-time and compile-time constants. In practice, this works out fine. It its value can only be k

Re: Bug 3999 and 4261

2010-09-01 Thread Don
Rainer Deyke wrote: On 8/31/2010 19:46, bearophile wrote: But you can use const for constants that are known at run-time only. While you can't use enum for constant known at run-time. In C++, const is used for both run-time and compile-time constants. In practice, this works out fine. It its

Re: Bug 3999 and 4261

2010-09-01 Thread bearophile
Kagamin: > >But enums are not integers > > ?? > Where did you get it? The whole point of this discussion about my enhancement request 3999 is to turn a certain subset of enums into "not integers" (or "not bytes", "not longs", etc). Bye, bearophile

Re: D.challenge

2010-09-01 Thread Justin Johansson
On 28/08/10 06:45, Andrej Mitrovic wrote: I like this idea. I don't know about showing off "superiority" of D, but it would be a good way to learn from each other. E.g. one could submit a solution to a challenge, and then others can refine it to be safer/faster/better in some regards if they want

Re: std.mixins

2010-09-01 Thread Torarin
TDPL says it should work for any type. http://d.puremagic.com/issues/show_bug.cgi?id=3382 2010/9/1 Nick Sabalausky : > "dsimcha" wrote in message > news:i5jtdn$1g4...@digitalmars.com... >> >> Isn't this a core language feature that's in the spec but is only >> currently >> implemented for arrays?

Re: [Slight OT] TDPL in Russia

2010-09-01 Thread Steven Schveighoffer
On Wed, 01 Sep 2010 02:59:42 -0400, Kagamin wrote: Steven Schveighoffer Wrote: This is all based on your opinion. And unfortunately it's all wrong -- I know what is good and what is bad, you should just stop posting. We both know, what is good, so we both should stop posting. I was jus

[D.typesystem] Static (CT) enforce anybody?

2010-09-01 Thread Justin Johansson
IIRC std.contracts has been deprecated and replaced by std.exception, enforce and friends. The latter are runtime things, correct(?). Is there a valid use case for compile-time (i.e. subject to static analysis) design-by-contract (DBC) enforce-like machinery? For example, and perhaps not the be

Re: [D.typesystem] Static (CT) enforce anybody?

2010-09-01 Thread Steven Schveighoffer
On Wed, 01 Sep 2010 09:03:39 -0400, Justin Johansson wrote: IIRC std.contracts has been deprecated and replaced by std.exception, enforce and friends. The latter are runtime things, correct(?). Is there a valid use case for compile-time (i.e. subject to static analysis) design-by-contract (DB

Re: std.mixins

2010-09-01 Thread Simen kjaeraas
Philippe Sigaud wrote: I also have a template that gets the list of all members of an aggregate type (classes, structs and, well, modules, in a way), even the constructors, even the overloaded members, separated by type, and list them with their names and associated type. It even gets the ty

[D.typesystem] Suggestion for improving OO inheritance models

2010-09-01 Thread Justin Johansson
Whilst one admirable aspiration of D is to make for better meta-programming capability in a PL, IMHO one seemingly-lacking aspiration of D is in the area of improving OO inheritance models over and above that provisioned for in C++ and Java. Maybe I'm ill-informed though I'd say that D, C++ and J

Re: [D.typesystem] Static (CT) enforce anybody?

2010-09-01 Thread Justin Johansson
On 01/09/10 22:49, Steven Schveighoffer wrote: Compile time checks are only available for compile time values. If you have a function like this: void foo(int[] x) There is no way at compile time to check whether x has a maximum or minimum number of elements. But if you have something like this:

[OT] Dark Star (1974) - the platinum age of movies

2010-09-01 Thread Justin Johansson
I know this is completely off topic and surely shows my age, but I wonder if anyone else on this ng has seen this movie. I couldn't remember the name of this movie but googling for movie star "bomb bay" "I think" found it for me first pop. Dark Star (1974) - Memorable quotes http://www.imdb.com/

Re: Bug 3999 and 4261

2010-09-01 Thread Daniel Gibson
Nick Sabalausky schrieb: "Daniel Gibson" wrote in message news:i5kbpr$24t...@digitalmars.com... bearophile schrieb: Daniel Gibson: Why not use the non-fictional const keyword? "The const attribute declares constants that can be evaluated at compile time."[1] But you can use const for constan

Re: Reporting TDPL bugs in Bugzilla

2010-09-01 Thread user
> To everyone reporting inconsistencies between Andrei's book and the > compiler -- please include TDPL or [tdpl] in the bug title, to make it > easier to search for them. These bugs have high priority. > To everyone reporting inconsistencies between Andrei's book and the > compiler -- please inc

Re: Reporting TDPL bugs in Bugzilla

2010-09-01 Thread dsimcha
== Quote from user (ad...@net.net)'s article > Tell me about another language which is so much work in progress after 10 > years of development. Python circa 2001? Lisp circa 1968? C++ circa 1993? C circa 1982? You're a funny, funny guy.

Re: Reporting TDPL bugs in Bugzilla

2010-09-01 Thread Yao G.
On Wed, 01 Sep 2010 10:49:46 -0500, user wrote: Thats ridiclous. The only purpose for prioriting these bugs is- you fail at compiler construction. The language is so full of shit.. why not be more honest? you had over 10 years of time to develop basic foundations but its still a amateurish

Re: [D.typesystem] Suggestion for improving OO inheritance models

2010-09-01 Thread retard
Wed, 01 Sep 2010 23:16:15 +0930, Justin Johansson wrote: > Whilst one admirable aspiration of D is to make for better > meta-programming capability in a PL, IMHO one seemingly-lacking > aspiration of D is in the area of improving OO inheritance models over > and above that provisioned for in C++ a

Re: [OT] Dark Star (1974) - the platinum age of movies

2010-09-01 Thread Russel Winder
Justin, Just remember that if you teach bombs phenomenology bad things tend to happen. On Wed, 2010-09-01 at 23:56 +0930, Justin Johansson wrote: > I know this is completely off topic and surely shows my age, > but I wonder if anyone else on this ng has seen this movie. > > I couldn't remember t

Re: Reporting TDPL bugs in Bugzilla

2010-09-01 Thread Andrei Alexandrescu
On 9/1/10 11:12 CDT, Yao G. wrote: On Wed, 01 Sep 2010 10:49:46 -0500, user wrote: Thats ridiclous. The only purpose for prioriting these bugs is- you fail at compiler construction. The language is so full of shit.. why not be more honest? you had over 10 years of time to develop basic foundat

Re: [OT] Dark Star (1974) - the platinum age of movies

2010-09-01 Thread Manfred_Nowak
Justin Johansson wrote: > returning to bomb bay Please remember, that leaving the bomb bay was faulty already---and may raise the question why after so many years you are still committing errors. -manfred

Re: [OT] Dark Star (1974) - the platinum age of movies

2010-09-01 Thread BLS
ok, Justin "Bomb #20" Johansson, point taken. Great movie, beside. On 01/09/2010 16:26, Justin Johansson wrote: I know this is completely off topic and surely shows my age, but I wonder if anyone else on this ng has seen this movie. I couldn't remember the name of this movie but googling for mo

Re: [OT] Dark Star (1974) - the platinum age of movies

2010-09-01 Thread JMRyan
Justin Johansson wrote in news:i5lnr4$1cm...@digitalmars.com: > I know this is completely off topic and surely shows my age, > but I wonder if anyone else on this ng has seen this movie. Perhaps of interest, a new DVD release is sceduled for late October.

Re: [OT] Dark Star (1974) - the platinum age of movies

2010-09-01 Thread Nick Sabalausky
"Justin Johansson" wrote in message news:i5lnr4$1cm...@digitalmars.com... >I know this is completely off topic and surely shows my age, > but I wonder if anyone else on this ng has seen this movie. > > I couldn't remember the name of this movie but googling for > movie star "bomb bay" "I think" >

Re: Bug 3999 and 4261

2010-09-01 Thread so
On Wed, 01 Sep 2010 11:06:51 +0300, Rainer Deyke wrote: On 8/31/2010 19:46, bearophile wrote: But you can use const for constants that are known at run-time only. While you can't use enum for constant known at run-time. In C++, const is used for both run-time and compile-time constants. I

Re: std.mixins

2010-09-01 Thread Nick Sabalausky
"Torarin" wrote in message news:mailman.31.1283345570.858.digitalmar...@puremagic.com... >2010/9/1 Nick Sabalausky : >> "dsimcha" wrote in message >> news:i5jtdn$1g4...@digitalmars.com... >>> >>> Isn't this a core language feature that's in the spec but is only >>> currently >>> implemented for

Re: Bug 3999 and 4261

2010-09-01 Thread Nick Sabalausky
"Daniel Gibson" wrote in message news:i5lrkr$1ij...@digitalmars.com... > Nick Sabalausky schrieb: >> "Daniel Gibson" wrote in message >> news:i5kbpr$24t...@digitalmars.com... >>> bearophile schrieb: Daniel Gibson: > Why not use the non-fictional const keyword? "The const attribute

Re: Bug 3999 and 4261

2010-09-01 Thread so
(I hope that example of bearophile is just a bug.) This one. void main(string[] args) { enum int n = args.length; } -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Re: [OT] Dark Star (1974) - the platinum age of movies

2010-09-01 Thread Walter Bright
Nick Sabalausky wrote: Never heard of it, but it sounds like something I'll have to check out :) Yes, you do. It's a classic.

Re: Bug 3999 and 4261

2010-09-01 Thread bearophile
so: > (I hope that example of bearophile is just a bug.) I have added it as bug 4786 Bye, bearophile

Re: Bug 3999 and 4261

2010-09-01 Thread Jonathan M Davis
On Wednesday, September 01, 2010 11:58:39 so wrote: > I have never had troubles with C++ compile/runtime "const" difference, > and don't think it is a problem in C++. With this in mind "enum" is a > great keyword > of choice to express compile-time types, as long as it is forbidden for > run-time c

Re: [Slight OT] TDPL in Russia

2010-09-01 Thread Walter Bright
Steven Schveighoffer wrote: I was just employing irony and sarcasm to demonstrate why your arguments were meaningless :) The only measurable factor for "good" art is how many people use it/buy it. For-sale software, books, movies do rather well, so I'm inclined to believe they are pretty good

Re: Bug 3999 and 4261

2010-09-01 Thread so
ctconst is a fictional keyword that denotes compile-time constants. Now you are probably able to see that there is no correlation between the n and Color. In D they are using the same keyword by accident, probably because Walter thinks that saving a keyword is more important than keeping th

Re: [OT] Dark Star (1974) - the platinum age of movies

2010-09-01 Thread Russel Winder
On Wed, 2010-09-01 at 12:01 -0700, Walter Bright wrote: > Nick Sabalausky wrote: > > Never heard of it, but it sounds like something I'll have to check out :) > > Yes, you do. It's a classic. Extremely serious low budget though -- everyone needs to remember that when watching (1974, so pre Star W

Re: [Slight OT] TDPL in Russia

2010-09-01 Thread Jonathan M Davis
On Wednesday, September 01, 2010 12:15:24 Walter Bright wrote: > Someone once told me that "capitalism doesn't support the arts". I asked > him how the Beatles got rich. Oops! Capitalism is going to tend to support what is generally popular or what is popular with the affluent crowd. Anything tha

Re: [Slight OT] TDPL in Russia

2010-09-01 Thread Nick Sabalausky
"Steven Schveighoffer" wrote in message news:op.victz4b5eav...@localhost.localdomain... > The only measurable factor for "good" art is how many people use it/buy > it. That's not a bad point - I can't think of many other metrics for art. Quality certainly can positively influence popularity.

Re: Bug 3999 and 4261

2010-09-01 Thread Steven Schveighoffer
On Tue, 31 Aug 2010 20:59:15 -0400, bearophile wrote: Daniel Gibson: Then there still is the consistency-issue (anon. enums are treated differently then named enums). Look at this:Se enum int n = 10; enum Color { Red, Green, Blue } Color color; if (color == Color.Red) { ... Color is a seq

Re: std.mixins

2010-09-01 Thread Philippe Sigaud
On Wed, Sep 1, 2010 at 20:59, Nick Sabalausky wrote: > "Torarin" wrote in message>TDPL says it should work > for any type. > >http://d.puremagic.com/issues/show_bug.cgi?id=3382 > > /me squeals with excitement like a schoolgirl > > > Any type, really? Even the basic built-in types, not only class

Re: std.mixins

2010-09-01 Thread Torarin
It says: "If a.fun(b, c, d) is seen but fun is not a member of a's type, D rewrites that as fun(a, b, c, d) and tries that as well." So I guess it's possible it won't work with numerical types because they can never have members. 2010/9/1 Philippe Sigaud : > On Wed, Sep 1, 2010 at 20:59, Nick Saba

Re: Bug 3999 and 4261

2010-09-01 Thread Jonathan M Davis
On Wednesday, September 01, 2010 12:36:04 Steven Schveighoffer wrote: > AFAIK, enum meaning manifest constant was Andrei's request. And I think > if you have an idea to try and "fix" it, you might as well know now, it > will never happen. See this quote from Andrei in a bug report of mine > (bug

Re: [Slight OT] TDPL in Russia

2010-09-01 Thread Nick Sabalausky
"Jonathan M Davis" wrote in message news:mailman.35.1283369617.858.digitalmar...@puremagic.com... > On Wednesday, September 01, 2010 12:15:24 Walter Bright wrote: >> There's a subgroup of the theater crowd around here who regard producers >> as >> "sellouts" if their plays actually attract an au

Re: std.mixins

2010-09-01 Thread Philippe Sigaud
On Wed, Sep 1, 2010 at 15:25, Simen kjaeraas wrote: > Philippe Sigaud wrote: > > I also have a template that gets the list of all members of an aggregate >> type (classes, structs and, well, modules, in a way), even the >> constructors, >> even the overloaded members, separated by type, and lis

Re: std.mixins

2010-09-01 Thread Philippe Sigaud
On Wed, Sep 1, 2010 at 21:47, Torarin wrote: > It says: "If a.fun(b, c, d) is seen but fun is not a member of a's > type, D rewrites that as fun(a, b, c, d) and tries that as well." > So I guess it's possible it won't work with numerical types because > they can never have members. > > I just tri

Re: [OT] Dark Star (1974) - the platinum age of movies

2010-09-01 Thread Nick Sabalausky
"Russel Winder" wrote in message news:mailman.34.1283369300.858.digitalmar...@puremagic.com... >On Wed, 2010-09-01 at 12:01 -0700, Walter Bright wrote: >> Nick Sabalausky wrote: >> > Never heard of it, but it sounds like something I'll have to check out >> > :) >> >> Yes, you do. It's a classic.

Re: Reporting TDPL bugs in Bugzilla

2010-09-01 Thread Gareth Charnock
On 01/09/10 16:49, user wrote: To everyone reporting inconsistencies between Andrei's book and the compiler -- please include TDPL or [tdpl] in the bug title, to make it easier to search for them. These bugs have high priority. To everyone reporting inconsistencies between Andrei's book and t

Re: Bug 3999 and 4261

2010-09-01 Thread Nick Sabalausky
"Jonathan M Davis" wrote in message news:mailman.33.1283368612.858.digitalmar...@puremagic.com... > > Personally, I don't really care about using enum the way it is. Having > enums > freely converting to and from their base type is more of a concern, though > I'm > not sure how much that really

Re: std.mixins

2010-09-01 Thread Torarin
2010/9/1 Philippe Sigaud : > I just tried this: > > >     int i; >     writeln(i.max); // writes int.max ! > > So it seems you can access the type properties through a value of that type. > Man, I learnt two new things in two minutes... > Yay, looks pretty good, then! :)

[Challenge] implementing the ambiguous operator in D

2010-09-01 Thread Philippe Sigaud
Hey, this question on SO makes for a good challenge: http://stackoverflow.com/questions/3608834/is-it-possible-to-generically-implement-the-amb-operator-in-d The amb operator does this: amb([1, 2]) * amb([3, 4, 5]) == amb([3, 4, 5, 6, 8, 10]) amb(["hello", "world"]) ~ amb(["qwerty"]) == amb(["he

Re: [Slight OT] TDPL in Russia

2010-09-01 Thread Steven Schveighoffer
On Wed, 01 Sep 2010 15:34:00 -0400, Nick Sabalausky wrote: "Steven Schveighoffer" wrote in message news:op.victz4b5eav...@localhost.localdomain... The only measurable factor for "good" art is how many people use it/buy it. That's not a bad point - I can't think of many other metrics for ar

Re: Bug 3999 and 4261

2010-09-01 Thread Nick Sabalausky
"Jonathan M Davis" wrote in message news:mailman.38.1283370572.858.digitalmar...@puremagic.com... > > You can think of it a bit like static. Static is used for different things > in > different contexts (even though most contexts are quite similar - IIRC, > there's a > way to define static in C

Re: Bug 3999 and 4261

2010-09-01 Thread so
Static is a little bit better in that the uses of it at least have some connection to the dictionary meaning of "static", even if perhaps a little distant. But there's just no way to stretch the dictionary meaning of "enumeration" to include manifest constants. Like everyone else, I can at leas

Re: std.mixins

2010-09-01 Thread Nick Sabalausky
"Torarin" wrote in message news:mailman.37.1283370434.858.digitalmar...@puremagic.com... > It says: "If a.fun(b, c, d) is seen but fun is not a member of a's > type, D rewrites that as fun(a, b, c, d) and tries that as well." > So I guess it's possible it won't work with numerical types because >

Re: Reporting TDPL bugs in Bugzilla

2010-09-01 Thread Stanislav Blinov
user wrote: To everyone reporting inconsistencies between Andrei's book and the compiler -- please include TDPL or [tdpl] in the bug title, to make it easier to search for them. These bugs have high priority. To everyone reporting inconsistencies between Andrei's book and the compiler -- plea

Re: Reporting TDPL bugs in Bugzilla

2010-09-01 Thread Andrej Mitrovic
If they were clever they wouldn't target an audience of programmers. :) On Wed, Sep 1, 2010 at 10:23 PM, Stanislav Blinov wrote: > user wrote: >>> >>> To everyone reporting inconsistencies between Andrei's book and the >>> compiler -- please include TDPL or [tdpl] in the bug title, to make it >>>

Re: Bug 3999 and 4261

2010-09-01 Thread Nick Sabalausky
"so" wrote in message news:op.videg00w7dt...@so-pc... >> Static is a little bit better in that the uses of it at least have some >> connection to the dictionary meaning of "static", even if perhaps a >> little >> distant. But there's just no way to stretch the dictionary meaning of >> "enumeratio

Re: [D.typesystem] Static (CT) enforce anybody?

2010-09-01 Thread Philippe Sigaud
On Wed, Sep 1, 2010 at 16:28, Justin Johansson wrote: > On 01/09/10 22:49, Steven Schveighoffer wrote: > >> Compile time checks are only available for compile time values. >> > Yes, Steve is right. Also, you cannot throw exceptions at CT. But you can use 'static assert(...)' to force the evaluat

Re: Bug 3999 and 4261

2010-09-01 Thread bearophile
so: > Another taste discussion? Nope. - Steven Schveighoffer: >And I think if you have an idea to try and "fix" it, you might as well know >now, it will never happen.< There I was explaining something better to Daniel Gibson. The purpose of the enhancement request 3999 has not

Re: [D.typesystem] Static (CT) enforce anybody?

2010-09-01 Thread bearophile
Philippe Sigaud: > Yes, Steve is right. Also, you cannot throw exceptions at CT. This is a temporary limitation :-) Bye, bearophile

Re: Bug 3999 and 4261

2010-09-01 Thread Jonathan M Davis
On Wednesday, September 01, 2010 12:59:01 Nick Sabalausky wrote: > "Jonathan M Davis" wrote in message > news:mailman.33.1283368612.858.digitalmar...@puremagic.com... > > > Personally, I don't really care about using enum the way it is. Having > > enums > > freely converting to and from their bas

Re: Bug 3999 and 4261

2010-09-01 Thread so
Float (short for "floating point"): The decimal point can "float" around as the value changes (not a literal use of "float", but there's nothing wrong with metaphoric uses of words, even in ordinary speech). This type is named in contrast to the fixed-point arithmetic that was often used as

Re: Reporting TDPL bugs in Bugzilla

2010-09-01 Thread Daniel Gibson
Stanislav Blinov schrieb: user wrote: To everyone reporting inconsistencies between Andrei's book and the compiler -- please include TDPL or [tdpl] in the bug title, to make it easier to search for them. These bugs have high priority. To everyone reporting inconsistencies between Andrei's bo

Re: std.mixins

2010-09-01 Thread Philippe Sigaud
On Wed, Sep 1, 2010 at 22:18, Nick Sabalausky wrote: > "Regression(2.020) Array member call syntax can't find matches in current > class" > http://d.puremagic.com/issues/show_bug.cgi?id=4525 > > When I converted some D1 code to D2 recently, I actually had to *remove* > many of my array-member-cal

Re: Bug 3999 and 4261

2010-09-01 Thread Andrej Mitrovic
I thought to!string(Enum) already does this? This was the example I posted in bug report 4261: import std.conv : to; import std.stdio: writeln; void main() { enum Foo { Zero, One } Foo f = Foo.One; writeln(to!string(f)); } Prints: One On Wed, Sep 1, 2010 at 10:50 PM, Jonathan M Davis

Re: [D.typesystem] Static (CT) enforce anybody?

2010-09-01 Thread Philippe Sigaud
On Wed, Sep 1, 2010 at 22:37, bearophile wrote: > Philippe Sigaud: > > Yes, Steve is right. Also, you cannot throw exceptions at CT. > > This is a temporary limitation :-) > > Really? That means being able to create reference types at CT, that'd be interesting, to say the least. And what code wou

Re: Reporting TDPL bugs in Bugzilla

2010-09-01 Thread Stanislav Blinov
Is it just me, or spam bots suddenly became incredibly clever? You call that clever? O_o For a bot. It almost seems as there is some intelligence behind this. Well, a little too almost, maybe.

Re: About removing the new keyword

2010-09-01 Thread Paulo Pinto
Why not? There are many examples of operating systems with garbage collector built-in. "Era Scarecrow" wrote in > to use delete. Also since this is a OS building language, i wouldn't expect a garbage > > collector in that instance at all. > > So, Delete should just be discouraged, not removed

Re: [D.typesystem] Suggestion for improving OO inheritance models

2010-09-01 Thread Philippe Sigaud
On Wed, Sep 1, 2010 at 18:13, retard wrote: > > Have you taken a loot at Scala & traits already? It would be a great > starting point. > Scala's traits are great! Implicits in Scala are quite interesting too. Also, Haskell typeclasses I wonder if D can have part of Scala traits functionality wi

Re: std.mixins

2010-09-01 Thread Jacob Carlborg
On 2010-08-31 03:04, dsimcha wrote: I've been toying for a long time with the idea of a std.mixins for Phobos that would contain meta-implementations of commonly needed boilerplate code for mixing into classes and and structs. I've started to prototype it (http://dsource.org/projects/scrapple/br

Re: Bug 3999 and 4261

2010-09-01 Thread so
Float (short for "floating point"): The decimal point can "float" around as the value changes (not a literal use of "float", but there's nothing wrong with metaphoric uses of words, even in ordinary speech). This type is named in contrast to the fixed-point arithmetic that was often used as

Re: [D.typesystem] Static (CT) enforce anybody?

2010-09-01 Thread Jonathan M Davis
On Wednesday, September 01, 2010 13:54:15 Philippe Sigaud wrote: > On Wed, Sep 1, 2010 at 22:37, bearophile wrote: > > Philippe Sigaud: > > > Yes, Steve is right. Also, you cannot throw exceptions at CT. > > > > This is a temporary limitation :-) > > Really? That means being able to create refer

Re: Bug 3999 and 4261

2010-09-01 Thread Jonathan M Davis
On Wednesday, September 01, 2010 13:53:51 Andrej Mitrovic wrote: > I thought to!string(Enum) already does this? This was the example I > posted in bug report 4261: > > import std.conv : to; > import std.stdio: writeln; > void main() > { > enum Foo { Zero, One } > Foo f = Foo.One; > wri

Re: Bug 3999 and 4261

2010-09-01 Thread Andrei Alexandrescu
On 9/1/10 15:35 CDT, bearophile wrote: so: Another taste discussion? Nope. - Steven Schveighoffer: And I think if you have an idea to try and "fix" it, you might as well know now, it will never happen.< There I was explaining something better to Daniel Gibson. The purpose

Re: [D.typesystem] Static (CT) enforce anybody?

2010-09-01 Thread bearophile
Philippe Sigaud: > Really? That means being able to create reference types at CT, that'd be > interesting, to say the least. And what code would catch them? Aren't they > caught by the runtime? I think in Bugzilla there is a patch to use exceptions at CT, but it probably doesn't work and has prob

Re: std.mixins

2010-09-01 Thread Jacob Carlborg
On 2010-09-01 14:52, Torarin wrote: TDPL says it should work for any type. http://d.puremagic.com/issues/show_bug.cgi?id=3382 2010/9/1 Nick Sabalausky: "dsimcha" wrote in message news:i5jtdn$1g4...@digitalmars.com... Isn't this a core language feature that's in the spec but is only currently

Re: [Slight OT] TDPL in Russia

2010-09-01 Thread Nick Sabalausky
"Steven Schveighoffer" wrote in message news:op.vidd20ldeav...@localhost.localdomain... > On Wed, 01 Sep 2010 15:34:00 -0400, Nick Sabalausky wrote: > >> PHP is wildly popular, but for anyone actually familiar >> with a variety of languages, the quality is undeniably poor, so again, we >> have t

Re: std.mixins

2010-09-01 Thread Nick Sabalausky
"Jacob Carlborg" wrote in message news:i5mg57$2sh...@digitalmars.com... > On 2010-09-01 14:52, Torarin wrote: >> TDPL says it should work for any type. >> http://d.puremagic.com/issues/show_bug.cgi?id=3382 >> >> 2010/9/1 Nick Sabalausky: >>> "dsimcha" wrote in message >>> news:i5jtdn$1g4...@digi

Re: [D.typesystem] Suggestion for improving OO inheritance models

2010-09-01 Thread Jacob Carlborg
On 2010-09-01 22:44, Philippe Sigaud wrote: On Wed, Sep 1, 2010 at 18:13, retard wrote: Have you taken a loot at Scala & traits already? It would be a great starting point. Scala's traits are great! Implicits in Scala are quite interesting too. Also, Haskell typeclasses I wonder if

Re: [D.typesystem] Suggestion for improving OO inheritance models

2010-09-01 Thread Andrej Mitrovic
You mean like this?: module add_virtual_functions; import std.stdio : writeln; void main() { test(); } mixin template Foo() { void func() { writeln("Foo.func()"); } } class Bar { void func() { writeln("Bar.func()"); } } class Code : Bar { mixin F

Re: Bug 3999 and 4261

2010-09-01 Thread Nick Sabalausky
"Andrej Mitrovic" wrote in message news:mailman.49.1283374449.858.digitalmar...@puremagic.com... >I thought to!string(Enum) already does this? This was the example I > posted in bug report 4261: > > import std.conv : to; > import std.stdio: writeln; > void main() > { >enum Foo { Zero, One } >

Re: Bug 3999 and 4261

2010-09-01 Thread Nick Sabalausky
"Andrei Alexandrescu" wrote in message news:i5mfji$2qt...@digitalmars.com... > > I think it's a good enhancement. C++'s good old enum has been instrumental > in finding a few bugs and clarifying a few interfaces in a project at > work. Based on that experience I'd say that there's a chance more

Re: [D.typesystem] Suggestion for improving OO inheritance models

2010-09-01 Thread Andrej Mitrovic
Disregard the module name declaration. The original example had the template mixin create a virtual method, and then you can override it in the inheriting class. On Wed, Sep 1, 2010 at 11:39 PM, Andrej Mitrovic wrote: > You mean like this?: > module add_virtual_functions; > > import std.stdio : w

Re: [D.typesystem] Suggestion for improving OO inheritance models

2010-09-01 Thread Andrej Mitrovic
Ah nevermind. I didn't realize you've said "overload". On Wed, Sep 1, 2010 at 11:39 PM, Andrej Mitrovic wrote: > You mean like this?: > module add_virtual_functions; > > import std.stdio : writeln; > > void main() > { >    test(); > } > > mixin template Foo() > { >    void func() >    { >        

Re: [Challenge] implementing the ambiguous operator in D

2010-09-01 Thread Peter Alexander
On 1/09/10 9:08 PM, Philippe Sigaud wrote: Peter, can we discuss your solution here? Sure, I'd be interested to hear any improvements. Like I said in my answer, I'm still learning D so I'm sure there's many issues. For example, I made no attempt for const-correctness or anything like that (m

Re: Bug 3999 and 4261

2010-09-01 Thread Andrej Mitrovic
That's how it's described in TDPL, and yes it works. On Wed, Sep 1, 2010 at 11:38 PM, Nick Sabalausky wrote: > "Andrej Mitrovic" wrote in message > news:mailman.49.1283374449.858.digitalmar...@puremagic.com... >>I thought to!string(Enum) already does this? This was the example I >> posted in bug

Re: Bug 3999 and 4261

2010-09-01 Thread Nick Sabalausky
"so" wrote in message news:op.vidgxic47dt...@so-pc... >> Float (short for "floating point"): The decimal point can "float" around >> as >> the value changes (not a literal use of "float", but there's nothing >> wrong >> with metaphoric uses of words, even in ordinary speech). This type is >> na

Re: Bug 3999 and 4261

2010-09-01 Thread Andrei Alexandrescu
On 9/1/10 16:39 CDT, Nick Sabalausky wrote: "Andrei Alexandrescu" wrote in message news:i5mfji$2qt...@digitalmars.com... I think it's a good enhancement. C++'s good old enum has been instrumental in finding a few bugs and clarifying a few interfaces in a project at work. Based on that experien

Re: std.mixins

2010-09-01 Thread bearophile
Nick Sabalausky: > But I also remember a certain someone (me!...plus some others) saying that > .1 and 1. float literals are completely worthless and in the face of > ambiguity with *useful* things, they need to DIE DIE DIE!!! See the second part of this (closed) enhancement request of mine :-)

Re: [D.typesystem] Suggestion for improving OO inheritance models

2010-09-01 Thread retard
Wed, 01 Sep 2010 23:30:08 +0200, Jacob Carlborg wrote: > On 2010-09-01 22:44, Philippe Sigaud wrote: >> On Wed, Sep 1, 2010 at 18:13, retard wrote: >> >> >> Have you taken a loot at Scala & traits already? It would be a >> great starting point. >> >> >> Scala's traits are great! Implicits

Re: [D.typesystem] Suggestion for improving OO inheritance models

2010-09-01 Thread Andrei Alexandrescu
On 9/1/10 16:56 CDT, retard wrote: Wed, 01 Sep 2010 23:30:08 +0200, Jacob Carlborg wrote: On 2010-09-01 22:44, Philippe Sigaud wrote: On Wed, Sep 1, 2010 at 18:13, retard wrote: Have you taken a loot at Scala& traits already? It would be a great starting point. Scala's traits a

Re: Bug 3999 and 4261

2010-09-01 Thread bearophile
Andrei: > I think it's a good enhancement. Good :-) > C++'s good old enum has been > instrumental in finding a few bugs and clarifying a few interfaces in a > project at work. Based on that experience I'd say that there's a chance > more restrictive is better. There is also the experience o

The new Mono GC

2010-09-01 Thread bearophile
Is it possible to try to replace (or just perform experiments) the D GC with this one? http://developers.sones.de/2010/09/01/taking-the-new-and-shiny-mono-simple-generational-garbage-collector-mono-sgen-for-a-walk/ Delegating the creation and management of the D GC to someone else (the Mono tea

Re: [OT] Dark Star (1974) - the platinum age of movies

2010-09-01 Thread Walter Bright
Russel Winder wrote: Extremely serious low budget though -- everyone needs to remember that when watching (1974, so pre Star Wars, and a very, very low budget). Dark Star and the Star Wars prequels prove that big budgets aren't what make a movie, a plot and good writing is.

Re: [OT] Dark Star (1974) - the platinum age of movies

2010-09-01 Thread so
On Thu, 02 Sep 2010 02:05:53 +0300, Walter Bright wrote: Russel Winder wrote: Extremely serious low budget though -- everyone needs to remember that when watching (1974, so pre Star Wars, and a very, very low budget). Dark Star and the Star Wars prequels prove that big budgets aren't what

Re: Reporting TDPL bugs in Bugzilla

2010-09-01 Thread Gareth Charnock
On 01/09/10 21:50, Stanislav Blinov wrote: Is it just me, or spam bots suddenly became incredibly clever? You call that clever? O_o For a bot. It almost seems as there is some intelligence behind this. Well, a little too almost, maybe. I checked and bug #1 isn't actually "give up already",

Re: [OT] Dark Star (1974) - the platinum age of movies

2010-09-01 Thread Jonathan M Davis
On Wednesday, September 01, 2010 16:17:42 so wrote: > On Thu, 02 Sep 2010 02:05:53 +0300, Walter Bright > > wrote: > > Russel Winder wrote: > >> Extremely serious low budget though -- everyone needs to remember that > >> when watching (1974, so pre Star Wars, and a very, very low budget). > > >

Re: [Slight OT] TDPL in Russia

2010-09-01 Thread BCS
Hello Walter, Steven Schveighoffer wrote: I was just employing irony and sarcasm to demonstrate why your arguments were meaningless :) The only measurable factor for "good" art is how many people use it/buy it. For-sale software, books, movies do rather well, so I'm inclined to believe they

Re: [Slight OT] TDPL in Russia

2010-09-01 Thread BCS
Hello Jonathan, Capitalism definitely supports them. However, if you're dealing with less well-known, less generally-liked stuff, then capitalism isnt't really going to support it. Amazon.com enters, stage right. There's a subgroup of the theater crowd around here who regard producers as "s

Re: [Slight OT] TDPL in Russia

2010-09-01 Thread Jonathan M Davis
On Wednesday, September 01, 2010 18:56:03 BCS wrote: > OTOH try and write a play that no one will watch. I'd be very surprised if > it can be done. LOL. There would always be someone who would want to watch it simply because no one else wants to. - Jonathan M Davis

  1   2   >