Re: No household is perfect

2013-12-11 Thread Tobias Pankrath
On Wednesday, 4 December 2013 at 17:11:07 UTC, Walter Bright wrote: 2. was the motivation for ADL (aka "Koenig Lookup") There was no way I was going to put ADL into D :-) --- // lib.d struct Struct {} // more.d import lib.d int front(Struct s) {} void popFront(ref Struct s) {} // main.d import

Re: No household is perfect

2013-12-10 Thread Walter Bright
On 12/10/2013 4:28 AM, Russel Winder wrote: I think this position is too restrictive and just wrong. If D is really aiming to stop internal DSLs using operators then D is missing the whole point of abstraction. But as noted I want code not just waffle to further this discussion. Looking forward

Re: No household is perfect

2013-12-10 Thread Luís.Marques
On Thursday, 5 December 2013 at 08:06:35 UTC, monarch_dodra wrote: Having read all that though, one could argue that having "uni" is *even worst* than "unicode", as it violates both: a) Use the ® symbol to indicate that the Unicode Mark b) Do not alter its spelling I don't care much about uni v

Re: No household is perfect

2013-12-10 Thread Russel Winder
On Tue, 2013-12-03 at 12:06 -0800, Walter Bright wrote: […] I have been waiting to answer this as I wanted to do some experiment first. However circumstances mean that this playing will have to wait till the Christmas break. I thought I should put a place holder message in though to mark that a re

Re: No household is perfect

2013-12-05 Thread Chris Cain
On Thursday, 5 December 2013 at 15:59:08 UTC, Don wrote: What I said was negligible was: "The advantage of AST macros is that the compiler doesn't need to re-lex and re-parse the result." It's a negligible benefit because most of the time is spent in the semantic pass (which can take unbounde

Re: No household is perfect

2013-12-05 Thread Don
On Thursday, 5 December 2013 at 14:18:46 UTC, Chris Cain wrote: On Thursday, 5 December 2013 at 09:25:30 UTC, Don wrote: I think that is of negligible benefit. There's not a whole of difference between manipulating an AST, vs manipulating text, and I'm confident that the time taken to do that i

Re: No household is perfect

2013-12-05 Thread Chris Cain
On Thursday, 5 December 2013 at 09:25:30 UTC, Don wrote: I think that is of negligible benefit. There's not a whole of difference between manipulating an AST, vs manipulating text, and I'm confident that the time taken to do that is always going to be far more than the time required to lex and

Re: No household is perfect

2013-12-05 Thread Timon Gehr
On 12/05/2013 10:25 AM, Don wrote: But IMHO there's a lot more to be gained from improvements to compile time reflection. In particular, improvements to the specification of its semantics. :)

Re: No household is perfect

2013-12-05 Thread eles
On Tuesday, 3 December 2013 at 19:56:24 UTC, Walter Bright wrote: On 12/3/2013 7:49 AM, eles wrote: You mean std.uni? Seriously, let's change that name into std.unicode. "unicode" is trademarked and could cause us some problems. So, no. http://www.erlang.org/doc/man/unicode.html

Re: No household is perfect

2013-12-05 Thread Don
On Thursday, 5 December 2013 at 08:17:01 UTC, Jacob Carlborg wrote: On 2013-12-04 19:55, Dmitry Olshansky wrote: I'll just add a bit of my experience on this. The coolest side of things is that you get to code a mini-compiler that has a very nice backend - D code. More then that you get opti

Re: No household is perfect

2013-12-05 Thread Simen Kjærås
On 2013-12-05 05:09, Shammah Chancellor wrote: On 2013-12-04 03:23:59 +, bearophile said: Joshua Niehus: This would make for a good blog post/wiki article.Does one already exist? If you have a AST macros like in Julia language, I think you can write something like: @setExpr(a ∪ (b ∩ c));

Re: No household is perfect

2013-12-05 Thread Jacob Carlborg
On 2013-12-04 19:55, Dmitry Olshansky wrote: I'll just add a bit of my experience on this. The coolest side of things is that you get to code a mini-compiler that has a very nice backend - D code. More then that you get optimizer and such for free. Then you only do the fun stuff - your frontend

Re: No household is perfect

2013-12-05 Thread monarch_dodra
On Thursday, 5 December 2013 at 06:04:20 UTC, Marco Leise wrote: Am Thu, 05 Dec 2013 06:16:14 +0100 schrieb "Kapps" : On Wednesday, 4 December 2013 at 17:21:24 UTC, Luís Marques wrote: > On Tuesday, 3 December 2013 at 19:56:24 UTC, Walter Bright > wrote: >> "unicode" is trademarked and could c

Re: No household is perfect

2013-12-04 Thread Marco Leise
Am Tue, 03 Dec 2013 23:23:07 +0100 schrieb "monarch_dodra" : > On Tuesday, 3 December 2013 at 20:09:52 UTC, Ary Borenszweig > wrote: > > On 12/3/13 4:53 PM, Andrei Alexandrescu wrote: > >> On 12/3/13 4:41 AM, Russel Winder wrote: > >>> On Tue, 2013-12-03 at 13:29 +0100, Tobias Pankrath wrote: > >

Re: No household is perfect

2013-12-04 Thread Marco Leise
Am Thu, 05 Dec 2013 06:16:14 +0100 schrieb "Kapps" : > On Wednesday, 4 December 2013 at 17:21:24 UTC, Luís Marques wrote: > > On Tuesday, 3 December 2013 at 19:56:24 UTC, Walter Bright > > wrote: > >> "unicode" is trademarked and could cause us some problems. So, > >> no. > > > > That seems unli

Re: No household is perfect

2013-12-04 Thread Kapps
On Wednesday, 4 December 2013 at 17:21:24 UTC, Luís Marques wrote: On Tuesday, 3 December 2013 at 19:56:24 UTC, Walter Bright wrote: "unicode" is trademarked and could cause us some problems. So, no. That seems unlikely. Also, it's not that different from std.windows, std.linux, etc. From h

Re: No household is perfect

2013-12-04 Thread Shammah Chancellor
On 2013-12-04 03:23:59 +, bearophile said: Joshua Niehus: This would make for a good blog post/wiki article. Does one already exist? If you have a AST macros like in Julia language, I think you can write something like: @setExpr(a ∪ (b ∩ c)); The main difference is that the compiler

Re: No household is perfect

2013-12-04 Thread Timon Gehr
On 12/04/2013 06:11 PM, Walter Bright wrote: On 12/4/2013 5:50 AM, Jakob Ovrum wrote: The point is that D does not have operator overloading for in-built types. The unnecessary one is the global operator overload you suggest, as it is more intrusive than `opBinaryRight`. The bad thing about th

Re: No household is perfect

2013-12-04 Thread Dmitry Olshansky
04-Dec-2013 20:22, Andrei Alexandrescu пишет: On 12/4/13 7:06 AM, H. S. Teoh wrote: On Wed, Dec 04, 2013 at 04:23:59AM +0100, bearophile wrote: Joshua Niehus: This would make for a good blog post/wiki article. Does one already exist? If you have a AST macros like in Julia language, I think

Re: No household is perfect

2013-12-04 Thread Parke
On Wednesday, 4 December 2013 at 17:21:24 UTC, Luís Marques wrote: On Tuesday, 3 December 2013 at 19:56:24 UTC, Walter Bright wrote: "unicode" is trademarked and could cause us some problems. So, no. That seems unlikely. Also, it's not that different from std.windows, std.linux, etc. Also,

Re: No household is perfect

2013-12-04 Thread Luís.Marques
On Tuesday, 3 December 2013 at 19:56:24 UTC, Walter Bright wrote: "unicode" is trademarked and could cause us some problems. So, no. That seems unlikely. Also, it's not that different from std.windows, std.linux, etc.

Re: No household is perfect

2013-12-04 Thread Walter Bright
On 12/4/2013 5:50 AM, Jakob Ovrum wrote: The point is that D does not have operator overloading for in-built types. The unnecessary one is the global operator overload you suggest, as it is more intrusive than `opBinaryRight`. The bad thing about the global operator overloading is that it: 1.

Re: No household is perfect

2013-12-04 Thread Walter Bright
On 12/4/2013 7:27 AM, H. S. Teoh wrote: Of course, it's not the *point* of DSLs to be distinct from the host language, but it's a good idea for it to be. Operator overloading that turns + and * into something completely unlike their usual meanings violates the principle of least surprise. A CTFE-

Re: No household is perfect

2013-12-04 Thread Andrei Alexandrescu
On 12/4/13 7:06 AM, H. S. Teoh wrote: On Wed, Dec 04, 2013 at 04:23:59AM +0100, bearophile wrote: Joshua Niehus: This would make for a good blog post/wiki article. Does one already exist? If you have a AST macros like in Julia language, I think you can write something like: @setExpr(a ∪ (b

Re: No household is perfect

2013-12-04 Thread eles
On Tuesday, 3 December 2013 at 21:12:36 UTC, Brad Anderson wrote: On Tuesday, 3 December 2013 at 19:56:24 UTC, Walter Bright wrote: On 12/3/2013 7:49 AM, eles wrote: The Unicode Consortium Name and Trademark Usage Policy: http://www.unicode.org/policies/logo_policy.html Yeah, bad. D allows

Re: No household is perfect

2013-12-04 Thread eles
On Tuesday, 3 December 2013 at 20:42:01 UTC, Paulo Pinto wrote: Am 03.12.2013 16:49, schrieb eles: On Tuesday, 3 December 2013 at 14:25:50 UTC, Paulo Pinto wrote: On Tuesday, 3 December 2013 at 12:41:40 UTC, Russel Winder wrote: On Tue, 2013-12-03 at 13:29 +0100, Tobias Pankrath wrote: It is

Re: No household is perfect

2013-12-04 Thread eles
On Tuesday, 3 December 2013 at 20:20:40 UTC, deadalnix wrote: On Tuesday, 3 December 2013 at 19:41:46 UTC, Andrei Alexandrescu wrote: Arguably, optional () and the mess involved around fall into the category of opaque and unclear syntax. yes, that was a trap

Re: No household is perfect

2013-12-04 Thread H. S. Teoh
On Wed, Dec 04, 2013 at 08:44:17AM +0100, Jacob Carlborg wrote: > On 2013-12-03 21:06, Walter Bright wrote: > > >Embedded DSLs should be visually distinct, and D provides the ability > >for that with string mixins and CTFE. > > The point of DSL's are to make a languages that work optimal and > lo

Re: No household is perfect

2013-12-04 Thread H. S. Teoh
On Wed, Dec 04, 2013 at 04:23:59AM +0100, bearophile wrote: > Joshua Niehus: > > >This would make for a good blog post/wiki article. Does one > >already exist? > > If you have a AST macros like in Julia language, I think you can > write something like: > > @setExpr(a ∪ (b ∩ c)); > > The main d

Re: No household is perfect

2013-12-04 Thread Jakob Ovrum
On Wednesday, 4 December 2013 at 13:39:32 UTC, Ary Borenszweig wrote: That's nice. Of course, it's not needed if you overload "+" for the int type to receive a complex. The point is that D does not have operator overloading for in-built types. The unnecessary one is the global operator over

Re: No household is perfect

2013-12-04 Thread Ary Borenszweig
On 12/3/13 7:23 PM, monarch_dodra wrote: On Tuesday, 3 December 2013 at 20:09:52 UTC, Ary Borenszweig wrote: On 12/3/13 4:53 PM, Andrei Alexandrescu wrote: On 12/3/13 4:41 AM, Russel Winder wrote: On Tue, 2013-12-03 at 13:29 +0100, Tobias Pankrath wrote: […] Does scala have arbitrary operator

Re: No household is perfect

2013-12-03 Thread Jacob Carlborg
On 2013-12-03 21:06, Walter Bright wrote: Embedded DSLs should be visually distinct, and D provides the ability for that with string mixins and CTFE. The point of DSL's are to make a languages that work optimal and look appropriate for the given domain. Not necessarily make it distinct from

Re: No household is perfect

2013-12-03 Thread bearophile
Joshua Niehus: This would make for a good blog post/wiki article. Does one already exist? If you have a AST macros like in Julia language, I think you can write something like: @setExpr(a ∪ (b ∩ c)); The main difference is that the compiler gives you a tree in the macro to work on, inste

Re: No household is perfect

2013-12-03 Thread Joshua Niehus
On Tuesday, 3 December 2013 at 22:28:26 UTC, H. S. Teoh wrote: [snip] Then you can write: Set a, b, c; auto d = mixin(SetExpr!"a ∪ (b ∩ c)"); // The above line gets turned into: // auto d = a.union(b.intersection(c)); // at compile-

Re: No household is perfect

2013-12-03 Thread H. S. Teoh
On Tue, Dec 03, 2013 at 09:19:34PM +0100, Brad Anderson wrote: > On Tuesday, 3 December 2013 at 20:06:49 UTC, Walter Bright wrote: > >On 12/3/2013 4:41 AM, Russel Winder wrote: > >>Yes. > >> > >>a + b > >> > >>could be set union, logic and, string concatenation. The + is just a > >>message to t

Re: No household is perfect

2013-12-03 Thread monarch_dodra
On Tuesday, 3 December 2013 at 20:09:52 UTC, Ary Borenszweig wrote: On 12/3/13 4:53 PM, Andrei Alexandrescu wrote: On 12/3/13 4:41 AM, Russel Winder wrote: On Tue, 2013-12-03 at 13:29 +0100, Tobias Pankrath wrote: […] Does scala have arbitrary operators like Haskell? Looks useless in D. If you

Re: No household is perfect

2013-12-03 Thread Brad Anderson
On Tuesday, 3 December 2013 at 19:56:24 UTC, Walter Bright wrote: On 12/3/2013 7:49 AM, eles wrote: You mean std.uni? Seriously, let's change that name into std.unicode. "unicode" is trademarked and could cause us some problems. So, no. Huh...sure enough: The Unicode Consortium Name and Tr

Re: No household is perfect

2013-12-03 Thread Paulo Pinto
Am 03.12.2013 16:36, schrieb Jesse Phillips: On Tuesday, 3 December 2013 at 09:46:27 UTC, Paulo Pinto wrote: Sadly plain C and C++ compilers are what most young developers know as AOT compilers, hence the spread of slow compilation message. -- Paulo I don't think that is limited to young deve

Re: No household is perfect

2013-12-03 Thread Paulo Pinto
Am 03.12.2013 16:49, schrieb eles: On Tuesday, 3 December 2013 at 14:25:50 UTC, Paulo Pinto wrote: On Tuesday, 3 December 2013 at 12:41:40 UTC, Russel Winder wrote: On Tue, 2013-12-03 at 13:29 +0100, Tobias Pankrath wrote: Maybe I've spent too much time with math at the uni. :) You mean st

Re: No household is perfect

2013-12-03 Thread deadalnix
On Tuesday, 3 December 2013 at 19:41:46 UTC, Andrei Alexandrescu wrote: On the other hand Walter has been adamantly against configurable syntax (and talked me into that stance as well), so D is immune from quite a few issues pointed by that rant. D code is readable at least at surface level wit

Re: No household is perfect

2013-12-03 Thread Brad Anderson
On Tuesday, 3 December 2013 at 20:06:49 UTC, Walter Bright wrote: On 12/3/2013 4:41 AM, Russel Winder wrote: Yes. a + b could be set union, logic and, string concatenation. The + is just a message to the LHS object, it determines what to do. This is the whole basis for DSLs. Using

Re: No household is perfect

2013-12-03 Thread Ary Borenszweig
On 12/3/13 4:53 PM, Andrei Alexandrescu wrote: On 12/3/13 4:41 AM, Russel Winder wrote: On Tue, 2013-12-03 at 13:29 +0100, Tobias Pankrath wrote: […] Does scala have arbitrary operators like Haskell? Looks useless in D. If you have an operator '+' that should not be pronounced 'plus' you are do

Re: No household is perfect

2013-12-03 Thread Walter Bright
On 12/2/2013 9:18 PM, Shammah Chancellor wrote: There are some beasts who fix bugs really quickly in the frontend. Yup, we have a couple of really prodigious contributors to the complex bits of the front end. rant/ With that said, I am finding though that a lot of the documentation on the

Re: No household is perfect

2013-12-03 Thread Walter Bright
On 12/3/2013 4:41 AM, Russel Winder wrote: Yes. a + b could be set union, logic and, string concatenation. The + is just a message to the LHS object, it determines what to do. This is the whole basis for DSLs. Using operator overloading to create a DSL is just wrong. Part of the desig

Re: No household is perfect

2013-12-03 Thread Walter Bright
On 12/3/2013 7:49 AM, eles wrote: You mean std.uni? Seriously, let's change that name into std.unicode. "unicode" is trademarked and could cause us some problems. So, no.

Re: No household is perfect

2013-12-03 Thread Walter Bright
On 12/3/2013 11:41 AM, Andrei Alexandrescu wrote: On the other hand Walter has been adamantly against configurable syntax (and talked me into that stance as well), so D is immune from quite a few issues pointed by that rant. D code is readable at least at surface level without needing context. A

Re: No household is perfect

2013-12-03 Thread Andrei Alexandrescu
On 12/3/13 4:41 AM, Russel Winder wrote: On Tue, 2013-12-03 at 13:29 +0100, Tobias Pankrath wrote: […] Does scala have arbitrary operators like Haskell? Looks useless in D. If you have an operator '+' that should not be pronounced 'plus' you are doing it wrong. Yes. a + b could be se

Re: No household is perfect

2013-12-03 Thread Andrei Alexandrescu
On 12/2/13 9:54 PM, Meta wrote: On Tuesday, 3 December 2013 at 03:06:20 UTC, Luís Marques wrote: On Tuesday, 3 December 2013 at 00:36:32 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/1rvltx/scala_1_would_not_program_again/#new I think he might not have liked D

Re: No household is perfect

2013-12-03 Thread Tobias Pankrath
On Tuesday, 3 December 2013 at 12:41:40 UTC, Russel Winder wrote: On Tue, 2013-12-03 at 13:29 +0100, Tobias Pankrath wrote: […] Does scala have arbitrary operators like Haskell? Looks useless in D. If you have an operator '+' that should not be pronounced 'plus' you are doing it wrong. Yes.

Re: No household is perfect

2013-12-03 Thread bearophile
eles: You mean std.uni? Seriously, let's change that name into std.unicode. I think he meant "Unicorn". Bye, bearophile

Re: No household is perfect

2013-12-03 Thread eles
On Tuesday, 3 December 2013 at 14:25:50 UTC, Paulo Pinto wrote: On Tuesday, 3 December 2013 at 12:41:40 UTC, Russel Winder wrote: On Tue, 2013-12-03 at 13:29 +0100, Tobias Pankrath wrote: Maybe I've spent too much time with math at the uni. :) You mean std.uni? Seriously, let's change that

Re: No household is perfect

2013-12-03 Thread Jesse Phillips
On Tuesday, 3 December 2013 at 09:46:27 UTC, Paulo Pinto wrote: Sadly plain C and C++ compilers are what most young developers know as AOT compilers, hence the spread of slow compilation message. -- Paulo I don't think that is limited to young developers. The only difference is that older d

Re: No household is perfect

2013-12-03 Thread Jesse Phillips
On Tuesday, 3 December 2013 at 12:18:32 UTC, bearophile wrote: Martin O.: we should do something about operators. I like James Ward's idea to mandate an alphabetic alias for every operator - at least people would know how to pronounce them then.< Bye, bearophile This is what was basically d

Re: No household is perfect

2013-12-03 Thread Paulo Pinto
On Tuesday, 3 December 2013 at 12:41:40 UTC, Russel Winder wrote: On Tue, 2013-12-03 at 13:29 +0100, Tobias Pankrath wrote: […] Does scala have arbitrary operators like Haskell? Looks useless in D. If you have an operator '+' that should not be pronounced 'plus' you are doing it wrong. Yes.

Re: No household is perfect

2013-12-03 Thread Russel Winder
On Tue, 2013-12-03 at 13:29 +0100, Tobias Pankrath wrote: […] > Does scala have arbitrary operators like Haskell? Looks useless > in D. If you have an operator '+' that should not be pronounced > 'plus' you are doing it wrong. Yes. a + b could be set union, logic and, string concatenat

Re: No household is perfect

2013-12-03 Thread Tobias Pankrath
On Tuesday, 3 December 2013 at 12:18:32 UTC, bearophile wrote: Andrei Alexandrescu: Odersky's response and the subsequent thread are interesting, too: https://groups.google.com/forum/?fromgroups#!topic/scala-debate/153H3Ya4Nxk An interesting idea: Martin O.: we should do something about ope

Re: No household is perfect

2013-12-03 Thread bearophile
Andrei Alexandrescu: Odersky's response and the subsequent thread are interesting, too: https://groups.google.com/forum/?fromgroups#!topic/scala-debate/153H3Ya4Nxk An interesting idea: Martin O.: we should do something about operators. I like James Ward's idea to mandate an alphabetic alias

Re: No household is perfect

2013-12-03 Thread Atila Neves
The main issue is that many seem to think very simple languages are the way to go, until they need to tackle complex problems and end up modeling manuly what other languages offer for free. Like code generation tools in Go to overcome templates, or crazy macros in C to support OOP. This can'

Re: No household is perfect

2013-12-03 Thread Paulo Pinto
On Tuesday, 3 December 2013 at 05:54:22 UTC, Meta wrote: On Tuesday, 3 December 2013 at 03:06:20 UTC, Luís Marques wrote: On Tuesday, 3 December 2013 at 00:36:32 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/1rvltx/scala_1_would_not_program_again/#new I think he

Re: No household is perfect

2013-12-02 Thread Meta
On Tuesday, 3 December 2013 at 03:06:20 UTC, Luís Marques wrote: On Tuesday, 3 December 2013 at 00:36:32 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/1rvltx/scala_1_would_not_program_again/#new I think he might not have liked D either: This leads to ridiculous

Re: No household is perfect

2013-12-02 Thread John J
On 12/02/2013 10:06 PM, "Luís Marques" " wrote: On Tuesday, 3 December 2013 at 00:36:32 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/1rvltx/scala_1_would_not_program_again/#new I think he might not have liked D either: No household is perfe

Re: No household is perfect

2013-12-02 Thread Shammah Chancellor
On 2013-12-03 03:01:12 +, Andrei Alexandrescu said: On 12/2/13 6:49 PM, Shammah Chancellor wrote: On 2013-12-03 00:36:28 +, Andrei Alexandrescu said: http://www.reddit.com/r/programming/comments/1rx8r2/go_binary_sizes_are_growing_out_of_control/ http://www.reddit.com/r/programming

Re: No household is perfect

2013-12-02 Thread Luís.Marques
On Tuesday, 3 December 2013 at 00:36:32 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/1rvltx/scala_1_would_not_program_again/#new I think he might not have liked D either: This leads to ridiculous decisions such as using ~ to glue handlers together in the flexib

Re: No household is perfect

2013-12-02 Thread Andrei Alexandrescu
On 12/2/13 6:49 PM, Shammah Chancellor wrote: On 2013-12-03 00:36:28 +, Andrei Alexandrescu said: http://www.reddit.com/r/programming/comments/1rx8r2/go_binary_sizes_are_growing_out_of_control/ http://www.reddit.com/r/programming/comments/1rvltx/scala_1_would_not_program_again/#new And

Re: No household is perfect

2013-12-02 Thread Shammah Chancellor
On 2013-12-03 00:36:28 +, Andrei Alexandrescu said: http://www.reddit.com/r/programming/comments/1rx8r2/go_binary_sizes_are_growing_out_of_control/ http://www.reddit.com/r/programming/comments/1rvltx/scala_1_would_not_program_again/#new Andrei I find this particularly interesting.

No household is perfect

2013-12-02 Thread Andrei Alexandrescu
http://www.reddit.com/r/programming/comments/1rx8r2/go_binary_sizes_are_growing_out_of_control/ http://www.reddit.com/r/programming/comments/1rvltx/scala_1_would_not_program_again/#new Andrei