Re: let (x,y) = ...

2015-02-19 Thread ponce via Digitalmars-d-announce
On Thursday, 19 February 2015 at 04:38:32 UTC, thedeemon wrote: Creating tuples and returning them from functions is trivial in D: auto getTuple() { return tuple(Bob, 42); } but using them afterwards can be confusing and error prone auto t = getTuple(); writeln(name is , t[0], age is ,

Re: let (x,y) = ...

2015-02-19 Thread bearophile via Digitalmars-d-announce
Kagamin: Doesn't let normally declare a new variable? You are right, yours is a valid point... So tie could be a better name after all. Bye, bearophile

Re: let (x,y) = ...

2015-02-19 Thread bearophile via Digitalmars-d-announce
Ola Fosheim Grøstad: Maybe change the name to tie: http://www.cplusplus.com/reference/tuple/tie/ ? I prefer let, it's much more traditional and descriptive. C++ standard library is often a bad example to follow... Bye, bearophile

Re: let (x,y) = ...

2015-02-19 Thread Kagamin via Digitalmars-d-announce
On Thursday, 19 February 2015 at 10:52:40 UTC, Kagamin wrote: On Thursday, 19 February 2015 at 09:50:25 UTC, bearophile wrote: I prefer let, it's much more traditional and descriptive. C++ standard library is often a bad example to follow... Doesn't let normally declare a new variable?

Re: let (x,y) = ...

2015-02-19 Thread bearophile via Digitalmars-d-announce
Mengu: that's a great example to show d's strength. thank you. It's also a great way to show what's missing in D syntax. Bye, bearophile

Re: let (x,y) = ...

2015-02-19 Thread via Digitalmars-d-announce
On Thursday, 19 February 2015 at 04:38:32 UTC, thedeemon wrote: let (name, age) = getTuple(); Maybe change the name to tie: http://www.cplusplus.com/reference/tuple/tie/ ?

Re: let (x,y) = ...

2015-02-19 Thread Kagamin via Digitalmars-d-announce
On Thursday, 19 February 2015 at 09:50:25 UTC, bearophile wrote: I prefer let, it's much more traditional and descriptive. C++ standard library is often a bad example to follow... Doesn't let normally declare a new variable?

Re: let (x,y) = ...

2015-02-19 Thread Mengu via Digitalmars-d-announce
On Thursday, 19 February 2015 at 04:38:32 UTC, thedeemon wrote: Creating tuples and returning them from functions is trivial in D: auto getTuple() { return tuple(Bob, 42); } but using them afterwards can be confusing and error prone auto t = getTuple(); writeln(name is , t[0], age is ,

Re: let (x,y) = ...

2015-02-19 Thread Kagamin via Digitalmars-d-announce
Or even more obvious (VBA,TSQL): set (x,y,z) = [1,2,3];

Re: let (x,y) = ...

2015-02-19 Thread thedeemon via Digitalmars-d-announce
On Thursday, 19 February 2015 at 09:46:13 UTC, Ola Fosheim Grøstad wrote: On Thursday, 19 February 2015 at 04:38:32 UTC, thedeemon wrote: let (name, age) = getTuple(); Maybe change the name to tie: http://www.cplusplus.com/reference/tuple/tie/ ? SML, OCaml, Haskell, F#, ATS, Rust, Swift and

Re: let (x,y) = ...

2015-02-19 Thread thedeemon via Digitalmars-d-announce
On Thursday, 19 February 2015 at 09:31:59 UTC, ponce wrote: That's pretty neat! May I turn this code into a d-idioms? Name and link will be kept of course. Sure, if you wish. There was just one person using this thing until today, so I dunno whether it deserves to be in that list.

Re: let (x,y) = ...

2015-02-19 Thread Martin Nowak via Digitalmars-d-announce
On 02/19/2015 11:04 AM, thedeemon wrote: SML, OCaml, Haskell, F#, ATS, Rust, Swift and others have it as let keyword, so personally I'd prefer continuing that tradition. It's semantically different though because it doesn't declare the variables.

Re: let (x,y) = ...

2015-02-19 Thread Martin Nowak via Digitalmars-d-announce
On 02/19/2015 12:59 PM, bearophile wrote: It's also a great way to show what's missing in D syntax. True that.

Re: let (x,y) = ...

2015-02-19 Thread bearophile via Digitalmars-d-announce
Kagamin: Or even more obvious (VBA,TSQL): set (x,y,z) = [1,2,3]; I prefer to use set as in Python, to define sets: s = set([1, 2, 3]) 2 in s True Bye, bearophile

Re: let (x,y) = ...

2015-02-19 Thread Nick Treleaven via Digitalmars-d-announce
On 19/02/2015 04:38, thedeemon wrote: int x, y, z, age; string name; let (name, age) = getTuple(); // tuple let (x,y,z) = argv[1..4].map!(to!int); // lazy range let (x,y,z) = [1,2,3]; // array SomeStruct s; let (s.a, s.b) = tuple(3, piggies); Alternatively

Re: let (x,y) = ...

2015-02-19 Thread Rory McGuire via Digitalmars-d-announce
let reads better either way I think. let this and that equal this other thing. On Thu, Feb 19, 2015 at 2:00 PM, bearophile via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Kagamin: Doesn't let normally declare a new variable? You are right, yours is a valid

Re: We are Beta (2.067.0-b2)

2015-02-19 Thread Brian Schott via Digitalmars-d-announce
On Wednesday, 18 February 2015 at 14:13:25 UTC, Martin Nowak wrote: Find more information on the dmd-beta mailing list. http://forum.dlang.org/thread/54e41ca2.4060...@dawg.eu Many of the beta-2 files are missing from downloads.dlang.org, and all of them are missing from ftp.digitalmars.com.

Re: quick-and-dirty minimalistic LISP engine

2015-02-19 Thread Bill Baxter via Digitalmars-d-announce
On Thu, Feb 19, 2015 at 8:30 AM, ketmar via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: On Thu, 19 Feb 2015 06:50:29 -0800, Bill Baxter via Digitalmars-d-announce wrote: If you weren't deliberately making a joke, you might want to google milf. no jokes, it's

Re: dfmt 0.1.0

2015-02-19 Thread Joakim via Digitalmars-d-announce
On Friday, 20 February 2015 at 02:21:01 UTC, Brian Schott wrote: dfmt is a D source code formatting tool. https://github.com/Hackerpilot/dfmt/ https://github.com/Hackerpilot/dfmt/releases/tag/v0.1.0 Thanks, you should list some of the formatting changes it makes in the README.

Re: We are Beta (2.067.0-b2)

2015-02-19 Thread Walter Bright via Digitalmars-d-announce
On 2/19/2015 2:06 PM, Brian Schott wrote: On Wednesday, 18 February 2015 at 14:13:25 UTC, Martin Nowak wrote: Find more information on the dmd-beta mailing list. http://forum.dlang.org/thread/54e41ca2.4060...@dawg.eu Many of the beta-2 files are missing from downloads.dlang.org, and all of

Re: dfmt 0.1.0

2015-02-19 Thread Joakim via Digitalmars-d-announce
On Friday, 20 February 2015 at 05:53:32 UTC, Brian Schott wrote: On Friday, 20 February 2015 at 05:23:45 UTC, Joakim wrote: On Friday, 20 February 2015 at 02:21:01 UTC, Brian Schott wrote: dfmt is a D source code formatting tool. https://github.com/Hackerpilot/dfmt/

Re: dfmt 0.1.0

2015-02-19 Thread Brian Schott via Digitalmars-d-announce
On Friday, 20 February 2015 at 05:23:45 UTC, Joakim wrote: On Friday, 20 February 2015 at 02:21:01 UTC, Brian Schott wrote: dfmt is a D source code formatting tool. https://github.com/Hackerpilot/dfmt/ https://github.com/Hackerpilot/dfmt/releases/tag/v0.1.0 Thanks, you should list some of

dfmt 0.1.0

2015-02-19 Thread Brian Schott via Digitalmars-d-announce
dfmt is a D source code formatting tool. https://github.com/Hackerpilot/dfmt/ https://github.com/Hackerpilot/dfmt/releases/tag/v0.1.0

Re: quick-and-dirty minimalistic LISP engine

2015-02-19 Thread via Digitalmars-d-announce
On Thursday, 19 February 2015 at 14:50:43 UTC, Bill Baxter wrote: If you weren't deliberately making a joke, you might want to google milf. What do you mean? It was my birthday! I became one year older!

Re: quick-and-dirty minimalistic LISP engine

2015-02-19 Thread ketmar via Digitalmars-d-announce
On Thu, 19 Feb 2015 06:50:29 -0800, Bill Baxter via Digitalmars-d-announce wrote: If you weren't deliberately making a joke, you might want to google milf. no jokes, it's Serious Bussiness! do you think that our project architect will allow to build our own milf without googling? or our

Re: We are Beta (2.067.0-b2)

2015-02-19 Thread FrankLike via Digitalmars-d-announce
On Wednesday, 18 February 2015 at 14:13:25 UTC, Martin Nowak wrote: Find more information on the dmd-beta mailing list. http://forum.dlang.org/thread/54e41ca2.4060...@dawg.eu 'lib32mscoff' should be in there,what do you think? Frank

Re: let (x,y) = ...

2015-02-19 Thread Nick Treleaven via Digitalmars-d-announce
On 19/02/2015 17:00, Nick Treleaven wrote: Alternatively std.typetuple.TypeTuple can be used instead of let not for ranges and arrays though Yes, but `tuple` overloads could be added for those. Or not - the length isn't known at compile-time. Tuple already supports construction from a

Re: quick-and-dirty minimalistic LISP engine

2015-02-19 Thread Bill Baxter via Digitalmars-d-announce
If you weren't deliberately making a joke, you might want to google milf. And if you were... Hmm interesting sense of humor you have there. On Feb 18, 2015 11:40 PM, via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: On Wednesday, 18 February 2015 at 22:37:34 UTC, ketmar

Re: let (x,y) = ...

2015-02-19 Thread John Colvin via Digitalmars-d-announce
On Thursday, 19 February 2015 at 13:52:29 UTC, Nick Treleaven wrote: On 19/02/2015 04:38, thedeemon wrote: int x, y, z, age; string name; let (name, age) = getTuple(); // tuple let (x,y,z) = argv[1..4].map!(to!int); // lazy range let (x,y,z) = [1,2,3]; // array

Re: let (x,y) = ...

2015-02-19 Thread Nick Treleaven via Digitalmars-d-announce
On 19/02/2015 14:59, John Colvin wrote: On Thursday, 19 February 2015 at 13:52:29 UTC, Nick Treleaven wrote: On 19/02/2015 04:38, thedeemon wrote: int x, y, z, age; string name; let (name, age) = getTuple(); // tuple let (x,y,z) = argv[1..4].map!(to!int); // lazy range let (x,y,z)

Re: quick-and-dirty minimalistic LISP engine

2015-02-19 Thread ketmar via Digitalmars-d-announce
On Thu, 19 Feb 2015 07:39:31 +, Ola Fosheim Grøstad wrote: That's quite ok. I enjoy just looking at D code by different authors to get a picture of how the language is used in real code. So thanks for sharing! same for me. i have a habit of downloading various D libraries and poking

Re: Coedit alpha 11 released

2015-02-19 Thread Baz via Digitalmars-d-announce
those useless options... the next version have an awesome option editor. about 100 settings just for the editor and the highlither http://imgur.com/RdmHyKJ

Re: dfmt 0.1.0

2015-02-19 Thread MartinNowak via Digitalmars-d-announce
On Friday, 20 February 2015 at 02:21:01 UTC, Brian Schott wrote: https://github.com/Hackerpilot/dfmt/ https://github.com/Hackerpilot/dfmt/releases/tag/v0.1.0 Congrats, I found the reformatting a bit harsh from time to time, but it's a good opportunity to finally settle style discussions.