Re: Descent, now with Open Type Hierarchy

2009-07-28 Thread Trass3r
Also the hover feature/Open Declaration sometimes behaves incorrectly. Unfortunately I couldn't really track down its cause yet :( Usually when hovering over a function call the ddoc output is correct. Then holding shift to see the source suddenly shows another function. F3 also jumps to that

Re: Descent, now with Open Type Hierarchy

2009-07-28 Thread Trass3r
Ary Borenszweig schrieb: Please report these things into the bug tracket: http://www.dsource.org/projects/descent/newticket I'd have done that, if I had managed to narrow down the problem.

D Framework

2009-07-28 Thread teo
I have a proposal. The idea isn't new and is perhaps a bit boring, but anyway. In the newsgroups there are many comments like: Can't just Phobos disappear? and similar. From other side the .NET Framework has a dull name, but everyone can tell you that this is _the_ framework for the .NET

Re: [~OT] Finally, a clear, concise D spec!

2009-07-28 Thread Ellery Newcomer
Jarrett Billingsley wrote: On Thu, Jul 23, 2009 at 10:23 PM, Daniel Keepdaniel.keep.li...@gmail.com wrote: Sorry, but you can't seriously claim D is still easy to implement whilst .stringof still exists in its current form. :P Oh, .stringof is nothing compared to the complexity added by

Re: The XML module in Phobos

2009-07-28 Thread Kagamin
llee Wrote: The std.xml module contains several bugs that need to be fixed. The most important one is that the parser fails to parse empty elements (IE elements that use the tag name=value / format). I'd like to report this bug to the modules' maintainer, but I don't know who to contact.

Re: Dynamic D Library

2009-07-28 Thread Daniel Keep
teo wrote: On Mon, 27 Jul 2009 20:34:44 +, BCS wrote: Reply to teo, I did some tests and here are the results: D cannot be used in Shared Objects. The only case that works is when no classes are exported and when there are no references to Phobos within the library. this works:

Re: D Framework

2009-07-28 Thread Lutger
teo wrote: I have a proposal. The idea isn't new and is perhaps a bit boring, but anyway. In the newsgroups there are many comments like: Can't just Phobos disappear? and similar. From other side the .NET Framework has a dull name, but everyone can tell you that this is _the_ framework for

Re: DIP4: Properties

2009-07-28 Thread Kagamin
Nick Sabalausky Wrote: An alternate usage/definition syntax for properties. http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP4 Overriding semantic should be outlined too.

Re: The empty statement ; - when is it useful?

2009-07-28 Thread Don
Stewart Gordon wrote: Andrei Alexandrescu wrote: D has ; as the empty statement. In fact I think it's an empty declaration because it can appear at top level. snip That's always been one of my peeves. At least, ever since I discovered that preventing such common C typos as if (...);

Re: The XML module in Phobos

2009-07-28 Thread Lars T. Kyllingstad
llee wrote: The std.xml module contains several bugs that need to be fixed. The most important one is that the parser fails to parse empty elements (IE elements that use the tag name=value / format). I'd like to report this bug to the modules' maintainer, but I don't know who to contact.

Re: The empty statement ; - when is it useful?

2009-07-28 Thread Christian Kamm
Don wrote: Interestingly CommaExpression doesn't seem to be defined anywhere in the D spec. It's under the heading of 'Expression': http://www.digitalmars.com/d/2.0/expression.html#Expression

Re: new DIP5: Properties 2

2009-07-28 Thread sclytrack
The property keyword looks nice though. What prevents us from doing more generic annotations with syntax like @property? --bb I don't know. Also I don't know where to put this post, so I'll just reply to yours :-) - Maybe @Property is too general. a) @Prop

Re: Reddit: why aren't people using D?

2009-07-28 Thread Kagamin
Andrei Alexandrescu Wrote: Might be because (a) we aren't getting our priorities right, (b) we ascribe more to properties than what the compiler really makes of them. At the end of the day, a property is a notational convenience. Instead of writing: obj.set_xyz(5); int a =

Re: new DIP5: Properties 2

2009-07-28 Thread Kagamin
sclytrack Wrote: - Maybe @Property is too general. b) @ToBeDisplayedInTheObjectInspectorOrPropertyEditorOfTheIDE (b) Would only be used in GUI api's, and not everywhere there is a setter or getter, mutator or accessor, reader or writer.

Re: Two optimizations

2009-07-28 Thread bearophile
Jarrett Billingsley: No, *bugzilla* and *the LDC ticket tracker* are the right place to ask for such optimizations. LDC isn't the right place for such optimizations because: - They are not easy, especially the first one, so Walter may be fitter for such work; - Such optimizations require brain

Re: new DIP5: Properties 2

2009-07-28 Thread Kagamin
Andrei Alexandrescu Wrote: I know you said you didn't really like the idea of having to name your range's empty function 'opGet_empty'. Correct. I'd rather try to disambiguate the rather rare case when a property returns a delegate etc. For me, I get a breath of fresh air whenever I

Annotations

2009-07-28 Thread Kagamin
Andrei Alexandrescu Wrote: What prevents us from doing more generic annotations with syntax like @property? Walter. No one's been able to convince him they're useful. Then someone better put forward a good argument. .Net framework is one big good argument, here are some usecases:

Re: new DIP5: Properties 2

2009-07-28 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:h4lsuo$au...@digitalmars.com... For me, I get a breath of fresh air whenever I get to not write (). I can't figure how some are missing it. Every time I call a parameterless function in D, I curse under my breath at

Re: Two optimizations

2009-07-28 Thread language_fan
Tue, 28 Jul 2009 04:53:02 -0400, bearophile thusly wrote: Such optimizations require brain and maybe even planning. So they have to be discussed first. The discussion or collective community opinion won't help a bit. Walter is the only person who decides what goes into the spec and what

Re: new DIP5: Properties 2

2009-07-28 Thread language_fan
Tue, 28 Jul 2009 04:57:57 -0400, Kagamin thusly wrote: Andrei Alexandrescu Wrote: I know you said you didn't really like the idea of having to name your range's empty function 'opGet_empty'. Correct. I'd rather try to disambiguate the rather rare case when a property returns a

Re: new DIP5: Properties 2

2009-07-28 Thread language_fan
Mon, 27 Jul 2009 22:57:09 -0500, Andrei Alexandrescu thusly wrote: Correct. I'd rather try to disambiguate the rather rare case when a property returns a delegate etc. For me, I get a breath of fresh air whenever I get to not write (). I can't figure how some are missing it. You would likely

Re: new DIP5: Properties 2

2009-07-28 Thread Ary Borenszweig
Jarrett Billingsley escribió: On Mon, Jul 27, 2009 at 11:13 PM, Andrei Alexandrescuseewebsiteforem...@erdani.org wrote: Rainer Deyke wrote: Benji Smith wrote: 3) The existence of magical identifiers complicates the language design. Because the rules that apply to those magical identifiers is

Re: new DIP5: Properties 2

2009-07-28 Thread bearophile
Ary Borenszweig: And currently D has 106 keywords. I think no one will care if it has 107. :-P So far the idea of adding the property keyword looks like a nice solution. But adding semantic annotations (Java-style, C#-style, or something different) to D2 may be a better solution to this

Re: [~OT] Finally, a clear, concise D spec!

2009-07-28 Thread Jarrett Billingsley
On Tue, Jul 28, 2009 at 2:43 AM, Ellery Newcomerellery-newco...@utulsa.edu wrote: Jarrett Billingsley wrote: On Thu, Jul 23, 2009 at 10:23 PM, Daniel Keepdaniel.keep.li...@gmail.com wrote: Sorry, but you can't seriously claim D is still easy to implement whilst .stringof still exists in its

Re: new DIP5: Properties 2

2009-07-28 Thread Jarrett Billingsley
On Mon, Jul 27, 2009 at 11:57 PM, Andrei Alexandrescuseewebsiteforem...@erdani.org wrote: The property attribute also has the nice property (heh) that you can call the property setters and getters either as properties or as functions (i.e. r.empty or r.empty()). Basically, the behavior would

Re: Reddit: why aren't people using D?

2009-07-28 Thread Steven Schveighoffer
On Mon, 27 Jul 2009 21:14:10 -0400, Rainer Deyke rain...@eldwood.com wrote: Benji Smith wrote: For my money, the best solution is a simple property keyword as a function modifier. Only functions with the property modifier would be allowed to pose as fields (getters called without parens,

Re: Annotations

2009-07-28 Thread Andrei Alexandrescu
Kagamin wrote: Andrei Alexandrescu Wrote: What prevents us from doing more generic annotations with syntax like @property? Walter. No one's been able to convince him they're useful. Then someone better put forward a good argument. .Net framework is one big good argument, here are some

Re: new DIP5: Properties 2

2009-07-28 Thread Andrei Alexandrescu
Nick Sabalausky wrote: Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:h4lsuo$au...@digitalmars.com... For me, I get a breath of fresh air whenever I get to not write (). I can't figure how some are missing it. Every time I call a parameterless function in D, I curse

Re: The XML module in Phobos

2009-07-28 Thread Andrei Alexandrescu
Lars T. Kyllingstad wrote: llee wrote: The std.xml module contains several bugs that need to be fixed. The most important one is that the parser fails to parse empty elements (IE elements that use the tag name=value / format). I'd like to report this bug to the modules' maintainer, but I

Re: new DIP5: Properties 2

2009-07-28 Thread Andrei Alexandrescu
Kagamin wrote: Andrei Alexandrescu Wrote: I know you said you didn't really like the idea of having to name your range's empty function 'opGet_empty'. Correct. I'd rather try to disambiguate the rather rare case when a property returns a delegate etc. For me, I get a breath of fresh air

Re: The XML module in Phobos

2009-07-28 Thread Daniel Keep
Andrei Alexandrescu wrote: Lars T. Kyllingstad wrote: llee wrote: The std.xml module contains several bugs that need to be fixed. The most important one is that the parser fails to parse empty elements (IE elements that use the tag name=value / format). I'd like to report this bug to the

Re: new DIP5: Properties 2

2009-07-28 Thread Andrei Alexandrescu
Jarrett Billingsley wrote: On Mon, Jul 27, 2009 at 11:57 PM, Andrei Alexandrescuseewebsiteforem...@erdani.org wrote: The property attribute also has the nice property (heh) that you can call the property setters and getters either as properties or as functions (i.e. r.empty or r.empty()).

Re: properties

2009-07-28 Thread Steven Schveighoffer
On Mon, 27 Jul 2009 18:37:01 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Steven Schveighoffer wrote: The getter notation that currently exists only has a few minor problems. The most major of those problems is if the return value is a callable type, such as a

Re: new DIP5: Properties 2

2009-07-28 Thread Andrei Alexandrescu
Kagamin wrote: Andrei Alexandrescu Wrote: I know you said you didn't really like the idea of having to name your range's empty function 'opGet_empty'. Correct. I'd rather try to disambiguate the rather rare case when a property returns a delegate etc. For me, I get a breath of fresh air

Re: The XML module in Phobos

2009-07-28 Thread Andrei Alexandrescu
Daniel Keep wrote: Andrei Alexandrescu wrote: Lars T. Kyllingstad wrote: llee wrote: The std.xml module contains several bugs that need to be fixed. The most important one is that the parser fails to parse empty elements (IE elements that use the tag name=value / format). I'd like to report

Re: new DIP5: Properties 2

2009-07-28 Thread Jarrett Billingsley
On Tue, Jul 28, 2009 at 10:08 AM, Andrei Alexandrescuseewebsiteforem...@erdani.org wrote: * The syntax foo = bar is rewritten into foo(bar) IF AND ONLY IF the expression auto __x = foo, __x = bar is compilable. // returns number of characters written int write(...) { ... } write = 42; //

Re: properties

2009-07-28 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Mon, 27 Jul 2009 18:37:01 -0400, Andrei Alexandrescu ... with zero arguments. No, callable types period. Note that this does not compile: class A { int delegate(int foo) wyda() { return delegate int(int foo) { return foo;}; } } int

Re: The XML module in Phobos

2009-07-28 Thread bearophile
Andrei Alexandrescu: Unfortunately I'm not seeing any. There's a simple solution, future D2 programmers will have both libs installed, so they will just use the Tango XML reader. So the best solution is to remove the XML reader from Phobos. The idea is to remove most inter-library redundancy.

Re: properties

2009-07-28 Thread Steven Schveighoffer
On Tue, 28 Jul 2009 10:16:16 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I think inferring meaning from the presence or absence of () is rather dicey. Really? Then why name your functions things like empty, why not ex245, to make them look it up, making *sure* they

Re: new DIP5: Properties 2

2009-07-28 Thread Leandro Lucarella
Walter Bright, el 27 de julio a las 12:45 me escribiste: Andrei Alexandrescu wrote: Leandro Lucarella wrote: Andrei Alexandrescu, el 27 de julio a las 08:45 me escribiste: I haven't seen Walter voice an opinion on any DIP so far. We desperately need to get a DIP through a full cycle. Has

Re: properties

2009-07-28 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Tue, 28 Jul 2009 10:16:16 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I think inferring meaning from the presence or absence of () is rather dicey. Really? Then why name your functions things like empty, why not ex245, to make them look

Re: The XML module in Phobos

2009-07-28 Thread Michel Fortin
On 2009-07-28 10:09:04 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org said: Yes, I think that will be necessary. Any volunteers? :o) Andrei There is already a high-performance one in Tango. There must be some way to avoid duplicating effort. Unfortunately I'm not seeing any.

Re: The XML module in Phobos

2009-07-28 Thread Ary Borenszweig
Michel Fortin wrote: On 2009-07-28 10:09:04 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org said: Yes, I think that will be necessary. Any volunteers? :o) Andrei There is already a high-performance one in Tango. There must be some way to avoid duplicating effort. Unfortunately

Re: The XML module in Phobos

2009-07-28 Thread Adam D. Ruppe
On Tue, Jul 28, 2009 at 12:23:50PM -0300, Ary Borenszweig wrote: But *why* use or make another one when the Tango one is already excellent? :( Copyright. -- Adam D. Ruppe http://arsdnet.net

Re: properties

2009-07-28 Thread Michel Fortin
On 2009-07-28 10:16:16 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org said: Well I don't think so. To repeat what I wrote elsethread: foo = bar is rewritten into foo(bar) if and only if auto __x = foo, __x = bar works. This means, a setter only works if there's a corresponding

Re: properties

2009-07-28 Thread Andrei Alexandrescu
Michel Fortin wrote: On 2009-07-28 10:16:16 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org said: Well I don't think so. To repeat what I wrote elsethread: foo = bar is rewritten into foo(bar) if and only if auto __x = foo, __x = bar works. This means, a setter only works if there's

Re: The XML module in Phobos

2009-07-28 Thread Michel Fortin
On 2009-07-28 11:38:36 -0400, Adam D. Ruppe destructiona...@gmail.com said: On Tue, Jul 28, 2009 at 12:23:50PM -0300, Ary Borenszweig wrote: But *why* use or make another one when the Tango one is already excellent? :( Copyright. That, and because there's some fun in doing it. Anyway, this

Re: properties

2009-07-28 Thread Steven Schveighoffer
On Tue, 28 Jul 2009 11:11:09 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Steven Schveighoffer wrote: On Tue, 28 Jul 2009 10:16:16 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I think inferring meaning from the presence or absence of () is rather

Re: The XML module in Phobos

2009-07-28 Thread language_fan
Tue, 28 Jul 2009 11:38:36 -0400, Adam D. Ruppe thusly wrote: On Tue, Jul 28, 2009 at 12:23:50PM -0300, Ary Borenszweig wrote: But *why* use or make another one when the Tango one is already excellent? :( Copyright. There are most likely several issues that prevent the reuse of that code.

Re: properties

2009-07-28 Thread Michel Fortin
On 2009-07-28 11:37:05 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org said: Michel Fortin wrote: On 2009-07-28 10:16:16 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org said: Well I don't think so. To repeat what I wrote elsethread: foo = bar is rewritten into foo(bar) if

Re: Reddit: why aren't people using D?

2009-07-28 Thread Michiel Helvensteijn
Rainer Deyke wrote: For my money, the best solution is a simple property keyword as a function modifier. Only functions with the property modifier would be allowed to pose as fields (getters called without parens, setters called using assignment syntax). But, in all other respects, they

Re: The XML module in Phobos

2009-07-28 Thread Ary Borenszweig
language_fan wrote: Tue, 28 Jul 2009 11:38:36 -0400, Adam D. Ruppe thusly wrote: On Tue, Jul 28, 2009 at 12:23:50PM -0300, Ary Borenszweig wrote: But *why* use or make another one when the Tango one is already excellent? :( Copyright. There are most likely several issues that prevent the

Re: The empty statement ; - when is it useful?

2009-07-28 Thread Bill Baxter
On Tue, Jul 28, 2009 at 12:09 AM, Donnos...@nospam.com wrote: Walter once claimed that it's useful for automatically generated code. Though I'm still not quite sure how. Yes. He's recently the claimed the same thing about the comma operator, but I don't buy that argument. I've never needed to

Re: The XML module in Phobos

2009-07-28 Thread Kagamin
Daniel Keep Wrote: There is already a high-performance one in Tango. There must be some way to avoid duplicating effort. Isn't it high-performance at the cost of not complaining to the DOM specification?

Re: properties

2009-07-28 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Tue, 28 Jul 2009 11:11:09 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Steven Schveighoffer wrote: On Tue, 28 Jul 2009 10:16:16 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I think inferring meaning from the presence or

Re: The empty statement ; - when is it useful?

2009-07-28 Thread Andrei Alexandrescu
Bill Baxter wrote: On Tue, Jul 28, 2009 at 12:09 AM, Donnos...@nospam.com wrote: Walter once claimed that it's useful for automatically generated code. Though I'm still not quite sure how. Yes. He's recently the claimed the same thing about the comma operator, but I don't buy that argument.

Re: new DIP5: Properties 2

2009-07-28 Thread Bill Baxter
On Tue, Jul 28, 2009 at 6:54 AM, Andrei Alexandrescuseewebsiteforem...@erdani.org wrote: Well there are quite a few other things that are arguably against C look and feel, such as the scope statement. I've never had a problem understanding code because of lacking (), and I never ever write

Re: properties

2009-07-28 Thread John C
Andrei Alexandrescu wrote: Again, most complaints have been directed towards writeln = 5. I think that's the major problem to be resolved. Here's another, one that's pretty common: class Person { private string name_; string name() { return name_; } } string[] split(string s,

Re: properties

2009-07-28 Thread Steven Schveighoffer
On Tue, 28 Jul 2009 12:30:00 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Steven Schveighoffer wrote: And for years, there have been complaints about it. This will continuously be a thorn in the side of D adoption until it is resolved. Again, most complaints have been

Re: Dynamic D Library

2009-07-28 Thread BCS
Reply to Daniel, Well of course it can't compile: YOU MOVED test.d! What do you expect when you tell it to import a file that no longer exists? The compiler is not psychic. If you really, absolutely have to have the two parts in different directories, just generate a header file. dmd -H -c

Re: Reddit: why aren't people using D?

2009-07-28 Thread KennyTM~
sclytrack wrote: - How does it interact with inheritance? Can I override properties? sure Can I partially override properties (setter but not getter)? C# no. - Can I write a setter that accepts another type? no - Can I write a templated setter that accepts *all* types? If so, how?

Re: The XML module in Phobos

2009-07-28 Thread Lutger
language_fan wrote: Tue, 28 Jul 2009 11:38:36 -0400, Adam D. Ruppe thusly wrote: On Tue, Jul 28, 2009 at 12:23:50PM -0300, Ary Borenszweig wrote: But *why* use or make another one when the Tango one is already excellent? :( Copyright. There are most likely several issues that prevent

Re: properties

2009-07-28 Thread Ary Borenszweig
Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 28 Jul 2009 11:11:09 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Guess what - they both behave like functions. So their properties are an elaborate mechanism that is actually thoroughly unchecked, thus going

Re: Reddit: why aren't people using D?

2009-07-28 Thread KennyTM~
Rainer Deyke wrote: Benji Smith wrote: For my money, the best solution is a simple property keyword as a function modifier. Only functions with the property modifier would be allowed to pose as fields (getters called without parens, setters called using assignment syntax). But, in all other

Re: properties

2009-07-28 Thread Ary Borenszweig
Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 28 Jul 2009 11:11:09 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: D's implementation looks to me like a quick hack so D can say look, we have properties! They don't provide any of the interface benefits that

Re: new DIP5: Properties 2

2009-07-28 Thread Ary Borenszweig
Bill Baxter wrote: On Tue, Jul 28, 2009 at 6:54 AM, Andrei Alexandrescuseewebsiteforem...@erdani.org wrote: Well there are quite a few other things that are arguably against C look and feel, such as the scope statement. I've never had a problem understanding code because of lacking (), and I

Re: The empty statement ; - when is it useful?

2009-07-28 Thread Daniel Keep
Andrei Alexandrescu wrote: Bill Baxter wrote: On Tue, Jul 28, 2009 at 12:09 AM, Donnos...@nospam.com wrote: Walter once claimed that it's useful for automatically generated code. Though I'm still not quite sure how. Yes. He's recently the claimed the same thing about the comma operator, but

Re: properties

2009-07-28 Thread Bill Baxter
On Tue, Jul 28, 2009 at 10:20 AM, Steven Schveighofferschvei...@yahoo.com wrote: On Tue, 28 Jul 2009 12:30:00 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Steven Schveighoffer wrote: What if the compiler allowed you to call functions as long as what you typed was an

Re: The empty statement ; - when is it useful?

2009-07-28 Thread Andrei Alexandrescu
Daniel Keep wrote: Andrei Alexandrescu wrote: Bill Baxter wrote: On Tue, Jul 28, 2009 at 12:09 AM, Donnos...@nospam.com wrote: Walter once claimed that it's useful for automatically generated code. Though I'm still not quite sure how. Yes. He's recently the claimed the same thing about the

Re: properties

2009-07-28 Thread Andrei Alexandrescu
Ary Borenszweig wrote: Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 28 Jul 2009 11:11:09 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Guess what - they both behave like functions. So their properties are an elaborate mechanism that is actually thoroughly

Re: new DIP5: Properties 2

2009-07-28 Thread Jimbob
Kagamin s...@here.lot wrote in message news:h4jq11$1jv...@digitalmars.com... http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP5 As namespaces were proposed, a variant of them is in DIP5 now. Why not just.. class Foo { private: int mx; public: int x.opGet() { return mx; }

Re: properties

2009-07-28 Thread Steven Schveighoffer
On Tue, 28 Jul 2009 13:51:11 -0400, Bill Baxter wbax...@gmail.com wrote: On Tue, Jul 28, 2009 at 10:20 AM, Steven Schveighofferschvei...@yahoo.com wrote: I want to use the parentheses or lack thereof as part of the human meaning for the function/property.  Making them optional means I can't

Re: new DIP5: Properties 2

2009-07-28 Thread bearophile
Bill Baxter: Now we may not want to go so hog wild putting @this and @that everywhere, but if we did we could get rid of 19 keywords right there, and add @property also without adding a new keyword. Glad to see I'm not the only one to think like this :-) Later more semantic attributes can be

Re: Dynamic D Library

2009-07-28 Thread teo
On Mon, 27 Jul 2009 20:34:44 +, BCS wrote: Reply to teo, I did some tests and here are the results: D cannot be used in Shared Objects. The only case that works is when no classes are exported and when there are no references to Phobos within the library. this works: it doesn't

Re: Dynamic D Library

2009-07-28 Thread teo
On Tue, 28 Jul 2009 17:02:31 +1000, Daniel Keep wrote: teo wrote: On Mon, 27 Jul 2009 20:34:44 +, BCS wrote: Reply to teo, I did some tests and here are the results: D cannot be used in Shared Objects. The only case that works is when no classes are exported and when there are no

Re: The empty statement ; - when is it useful?

2009-07-28 Thread Arthur Lloyd
Daniel Keep Wrote: U comma(T,U)(T a, U b) { return b; } Is there any reason you couldn't use something like that? Sorry, this is probably a newbie question, but.. So instead of return a, b, c; you now have to write return comma(a, comma(b, c)); ? How will that help?

Re: new DIP5: Properties 2

2009-07-28 Thread Arthur Lloyd
Ary Borenszweig Wrote: Definitely. I think attributes/annotations is the best solution for this. It's also the most extensible way to do it. The lexer and parser doesn't need to change for each new attribute. Maybe just the semantic pass. That's ingenious. No need to change the lexer and

Re: new DIP5: Properties 2

2009-07-28 Thread Bill Baxter
On Tue, Jul 28, 2009 at 11:12 AM, bearophilebearophileh...@lycos.com wrote: Bill Baxter: Now we may not want to go so hog wild putting @this and @that everywhere, but if we did we could get rid of 19 keywords right there, and add @property also without adding a new keyword. Glad to see I'm

Re: The empty statement ; - when is it useful?

2009-07-28 Thread Jarrett Billingsley
Tue, Jul 28, 2009 at 2:28 PM, Arthur Lloydv...@google.com wrote: Daniel Keep Wrote: U comma(T,U)(T a, U b) { return b; } Is there any reason you couldn't use something like that? Sorry, this is probably a newbie question, but.. So instead of return a, b, c; you now have to write return

Re: The empty statement ; - when is it useful?

2009-07-28 Thread Don
Stewart Gordon wrote: Don wrote: Andrei Alexandrescu wrote: snip blah: {} Except in an asm block. Can't think of anything else. snip But an asm block doesn't contain D statements, so that's another matter. Stewart. Yes, you're right, it's asm syntax -- though it's an asm syntax which

Re: properties

2009-07-28 Thread Steven Schveighoffer
On Tue, 28 Jul 2009 14:19:49 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Bill Baxter wrote: On Tue, Jul 28, 2009 at 10:20 AM, Steven Schveighofferschvei...@yahoo.com wrote: On Tue, 28 Jul 2009 12:30:00 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote:

Re: properties

2009-07-28 Thread Jérôme M. Berger
Andrei Alexandrescu wrote: Steven Schveighoffer wrote: The presence or absence of parens is a hard-coded accepted meaning of field vs. function. I understand how some people want to derive meaning from obj.foo() versus obj.foo. I think they shouldn't in D. I mean D has had for years the

Re: new DIP5: Properties 2

2009-07-28 Thread bearophile
Bill Baxter: Switch is a monstrosity pretty much any way you look at it. Sh had the right idea there. Is case really necessary there? Some syntax should suffice I would thing. And default is probably the world's most useless keyword. Why not else: or *: instead of introducing a whole new

Re: Two optimizations

2009-07-28 Thread Don
language_fan wrote: Tue, 28 Jul 2009 04:53:02 -0400, bearophile thusly wrote: Such optimizations require brain and maybe even planning. So they have to be discussed first. The discussion or collective community opinion won't help a bit. Walter is the only person who decides what goes into

Re: Dynamic D Library

2009-07-28 Thread Jérôme M. Berger
Daniel Keep wrote: teo wrote: On Mon, 27 Jul 2009 20:34:44 +, BCS wrote: Reply to teo, I did some tests and here are the results: D cannot be used in Shared Objects. The only case that works is when no classes are exported and when there are no references to Phobos within the library.

Re: Dynamic D Library

2009-07-28 Thread Jérôme M. Berger
Jérôme M. Berger wrote: Or just use the -I command line argument to point to the folder in which test.d is stored. Jerome PS: Just as in C/C++, really -- mailto:jeber...@free.fr http://jeberger.free.fr Jabber: jeber...@jabber.fr signature.asc Description: OpenPGP digital

Re: properties

2009-07-28 Thread Bill Baxter
On Tue, Jul 28, 2009 at 11:19 AM, Andrei Alexandrescuseewebsiteforem...@erdani.org wrote: Bill Baxter wrote: On Tue, Jul 28, 2009 at 10:20 AM, Steven Schveighofferschvei...@yahoo.com wrote: On Tue, 28 Jul 2009 12:30:00 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Steven

Re: new DIP5: Properties 2

2009-07-28 Thread Ary Borenszweig
Arthur Lloyd wrote: Ary Borenszweig Wrote: Definitely. I think attributes/annotations is the best solution for this. It's also the most extensible way to do it. The lexer and parser doesn't need to change for each new attribute. Maybe just the semantic pass. That's ingenious. No need to

Re: The empty statement ; - when is it useful?

2009-07-28 Thread Don
Bill Baxter wrote: On Tue, Jul 28, 2009 at 12:09 AM, Donnos...@nospam.com wrote: Walter once claimed that it's useful for automatically generated code. Though I'm still not quite sure how. Yes. He's recently the claimed the same thing about the comma operator, but I don't buy that argument.

Re: new DIP5: Properties 2

2009-07-28 Thread Bill Baxter
On Tue, Jul 28, 2009 at 12:01 PM, bearophilebearophileh...@lycos.com wrote: Bill Baxter: Switch is a monstrosity pretty much any way you look at it.  Sh had the right idea there.  Is case really necessary there?  Some syntax should suffice I would thing.  And default is probably the world's

Re: properties

2009-07-28 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: However, when I see: x.empty; I can't tell what is implied here. You can. In either C# or D language it could execute arbitrary code that you better know what it's supposed to do. D simply doesn't make it bad style as C# stupidly does. Andrei

Re: properties

2009-07-28 Thread Andrei Alexandrescu
Jérôme M. Berger wrote: Andrei Alexandrescu wrote: Steven Schveighoffer wrote: The presence or absence of parens is a hard-coded accepted meaning of field vs. function. I understand how some people want to derive meaning from obj.foo() versus obj.foo. I think they shouldn't in D. I mean D

Re: new DIP5: Properties 2

2009-07-28 Thread Michel Fortin
On 2009-07-28 10:08:17 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org said: My perception is that there are a few vocal people. The protests have been historically against the stupid writeln = 42 which we must get rid of. For the record, I'm not even bothered by such things.

Re: properties

2009-07-28 Thread Steven Schveighoffer
On Tue, 28 Jul 2009 16:08:58 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Steven Schveighoffer wrote: However, when I see: x.empty; I can't tell what is implied here. You can. In either C# or D language it could execute arbitrary code that you better know what it's

Re: D Framework

2009-07-28 Thread teo
On Tue, 28 Jul 2009 08:55:17 +0200, Lutger wrote: Sorry for the rant, I just think phobos as is developing is superior to the .NET framework and has a much cooler name too :) Same goes for Tango, albeit quite different design than phobos, it's very good too and beats .NET hands down. Also,

Re: properties

2009-07-28 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Tue, 28 Jul 2009 16:08:58 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Steven Schveighoffer wrote: However, when I see: x.empty; I can't tell what is implied here. You can. In either C# or D language it could execute arbitrary code that

std.format request

2009-07-28 Thread Saaa
Could an option be added to the formatting to elide trailing zero's for %f ? That way it is possible to create an more optimal formatting for which the following holds: float f; s = format(f); float f2 = to!(float)(s); assert(f==f2); The formatting I'm trying to get can be seen here (decimal):

Re: properties

2009-07-28 Thread aarti_pl
Andrei Alexandrescu pisze: Steven Schveighoffer wrote: On Tue, 28 Jul 2009 16:08:58 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Steven Schveighoffer wrote: However, when I see: x.empty; I can't tell what is implied here. You can. In either C# or D language it could

Re: properties

2009-07-28 Thread Steven Schveighoffer
On Tue, 28 Jul 2009 16:21:09 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Steven Schveighoffer wrote: On Tue, 28 Jul 2009 16:08:58 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Steven Schveighoffer wrote: However, when I see: x.empty; I can't tell

Re: properties

2009-07-28 Thread Ary Borenszweig
aarti_pl wrote: Andrei Alexandrescu pisze: Steven Schveighoffer wrote: On Tue, 28 Jul 2009 16:08:58 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Steven Schveighoffer wrote: However, when I see: x.empty; I can't tell what is implied here. You can. In either C# or D

  1   2   >