Re: Targeting C

2009-10-30 Thread rmcguire
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: grauzone wrote: Andrei Alexandrescu wrote: Pelle Månsson wrote: Andrei Alexandrescu wrote: Yigal Chripun wrote: On 23/10/2009 13:02, bearophile wrote: Chris Nicholson-Sauls: I prefer this (Scala): list = list ++ (0 to 10)

Re: Targeting C

2009-10-30 Thread Andrei Alexandrescu
rmcguire wrote: Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: grauzone wrote: Andrei Alexandrescu wrote: Pelle Månsson wrote: Andrei Alexandrescu wrote: Yigal Chripun wrote: On 23/10/2009 13:02, bearophile wrote: Chris Nicholson-Sauls: I prefer this (Scala): list = list ++

Re: Targeting C

2009-10-30 Thread Denis Koroskin
On Fri, 30 Oct 2009 10:05:27 +0300, rmcguire rjmcgu...@gmail.com wrote: Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: grauzone wrote: Andrei Alexandrescu wrote: Pelle Månsson wrote: Andrei Alexandrescu wrote: Yigal Chripun wrote: On 23/10/2009 13:02, bearophile wrote: Chris

Re: [OT] Re: Targeting C

2009-10-24 Thread Max Samukha
On Fri, 23 Oct 2009 13:08:06 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I wanted to use auto, but ddoc cannot document functions with auto returns. Andrei When I need to hack around an 'auto' bug, I sometimes factor out the return type to a template: template IotaRet(B,

Re: [OT] Re: Targeting C

2009-10-24 Thread Andrei Alexandrescu
Max Samukha wrote: On Fri, 23 Oct 2009 13:08:06 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I wanted to use auto, but ddoc cannot document functions with auto returns. Andrei When I need to hack around an 'auto' bug, I sometimes factor out the return type to a template:

Re: Targeting C

2009-10-23 Thread Chris Nicholson-Sauls
bearophile wrote: Pelle Månsson: Personally, I like this: foreach (i; 0..10) list ~= i; more. :) While I like this more: for (i in 0 .. 10) list ~= i; Bye, bearophile I prefer this (Scala): list = list ++ (0 to 10) Okay, that's not really fair. The direct port to Scala would be more

Re: Targeting C

2009-10-23 Thread bearophile
Chris Nicholson-Sauls: I prefer this (Scala): list = list ++ (0 to 10) That's quite less readable. Scala sometimes has some unreadable syntax. Python has taught me how much useful a readable syntax is :-) Designing languages requires to find a balance between several different and opposed

Re: Targeting C

2009-10-23 Thread Andrei Alexandrescu
Yigal Chripun wrote: On 23/10/2009 13:02, bearophile wrote: Chris Nicholson-Sauls: I prefer this (Scala): list = list ++ (0 to 10) That's quite less readable. Scala sometimes has some unreadable syntax. Python has taught me how much useful a readable syntax is :-) Designing languages

Re: Targeting C

2009-10-23 Thread Bill Baxter
On Fri, Oct 23, 2009 at 5:13 AM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Yigal Chripun wrote: On 23/10/2009 13:02, bearophile wrote: Chris Nicholson-Sauls: I prefer this (Scala): list = list ++ (0 to 10) That's quite less readable. Scala sometimes has some unreadable

Re: Targeting C

2009-10-23 Thread Pelle Månsson
Andrei Alexandrescu wrote: Yigal Chripun wrote: On 23/10/2009 13:02, bearophile wrote: Chris Nicholson-Sauls: I prefer this (Scala): list = list ++ (0 to 10) That's quite less readable. Scala sometimes has some unreadable syntax. Python has taught me how much useful a readable syntax is

Re: Targeting C

2009-10-23 Thread bearophile
Yigal Chripun: Ranges are already part of the compiler because of foreach, can we also add language support for Range literals? In both iota and other possible implementations I'd like the arguments used by Python range/xrange, they are optimal, and better than the currently ones used by

Re: Targeting C

2009-10-23 Thread Max Samukha
On Fri, 23 Oct 2009 18:16:29 +0200, Pelle M?nsson pelle.mans...@gmail.com wrote: Andrei Alexandrescu wrote: Yigal Chripun wrote: On 23/10/2009 13:02, bearophile wrote: Chris Nicholson-Sauls: I prefer this (Scala): list = list ++ (0 to 10) That's quite less readable. Scala sometimes has

Re: Targeting C

2009-10-23 Thread Andrei Alexandrescu
Pelle Månsson wrote: Andrei Alexandrescu wrote: Yigal Chripun wrote: On 23/10/2009 13:02, bearophile wrote: Chris Nicholson-Sauls: I prefer this (Scala): list = list ++ (0 to 10) That's quite less readable. Scala sometimes has some unreadable syntax. Python has taught me how much useful

Re: Targeting C

2009-10-23 Thread Leandro Lucarella
Bill Baxter, el 23 de octubre a las 08:51 me escribiste: list ~= array(iota(0, 10)); While we're not on the subject Iota is right up there with inSitu. I know it has a precedent elsewhere, but it sounds about as user friendly as monads. It just sounds like the language it trying to be

Re: Targeting C

2009-10-23 Thread Yigal Chripun
On 23/10/2009 18:29, bearophile wrote: Yigal Chripun: Ranges are already part of the compiler because of foreach, can we also add language support for Range literals? In both iota and other possible implementations I'd like the arguments used by Python range/xrange, they are optimal, and

Re: Targeting C

2009-10-23 Thread bearophile
Yigal Chripun: Hell no. This is why I hate certain programming languages. if you are trying to obfuscate the language than why not just define: rtqfrdsg and fdkjtkf as the function names? Don't be silly. In my dlibs xsomething are the lazy functions, and something are the strict ones. That's

Re: Targeting C

2009-10-23 Thread Pelle Månsson
bearophile wrote: Yigal Chripun: Hell no. This is why I hate certain programming languages. if you are trying to obfuscate the language than why not just define: rtqfrdsg and fdkjtkf as the function names? Don't be silly. In my dlibs xsomething are the lazy functions, and something are the

[OT] Re: Targeting C

2009-10-23 Thread Steven Schveighoffer
On Fri, 23 Oct 2009 12:50:34 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: What does iota mean? http://www.digitalmars.com/d/2.0/phobos/std_range.html#iota Irony minded. I'm destroyed. Hm... this is slightly off topic, but that function signature is absolutely

Re: [OT] Re: Targeting C

2009-10-23 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Fri, 23 Oct 2009 12:50:34 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: What does iota mean? http://www.digitalmars.com/d/2.0/phobos/std_range.html#iota Irony minded. I'm destroyed. Hm... this is slightly off topic, but that function

Re: Targeting C

2009-10-23 Thread Andrei Alexandrescu
Bill Baxter wrote: On Fri, Oct 23, 2009 at 5:13 AM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Yigal Chripun wrote: On 23/10/2009 13:02, bearophile wrote: Chris Nicholson-Sauls: I prefer this (Scala): list = list ++ (0 to 10) That's quite less readable. Scala sometimes has

Re: Targeting C

2009-10-23 Thread Andrei Alexandrescu
Pelle Månsson wrote: bearophile wrote: Yigal Chripun: Hell no. This is why I hate certain programming languages. if you are trying to obfuscate the language than why not just define: rtqfrdsg and fdkjtkf as the function names? Don't be silly. In my dlibs xsomething are the lazy functions,

Re: Targeting C

2009-10-23 Thread Yigal Chripun
On 23/10/2009 19:49, Pelle Månsson wrote: bearophile wrote: Yigal Chripun: Hell no. This is why I hate certain programming languages. if you are trying to obfuscate the language than why not just define: rtqfrdsg and fdkjtkf as the function names? Don't be silly. In my dlibs xsomething are

Re: Targeting C

2009-10-23 Thread Jérôme M. Berger
Yigal Chripun wrote: On 23/10/2009 18:29, bearophile wrote: Yigal Chripun: Ranges are already part of the compiler because of foreach, can we also add language support for Range literals? In both iota and other possible implementations I'd like the arguments used by Python range/xrange,

Re: Targeting C

2009-10-23 Thread Jérôme M. Berger
Pelle Månsson wrote: Andrei Alexandrescu wrote: Yigal Chripun wrote: On 23/10/2009 13:02, bearophile wrote: Chris Nicholson-Sauls: I prefer this (Scala): list = list ++ (0 to 10) That's quite less readable. Scala sometimes has some unreadable syntax. Python has taught me how much useful

Re: Targeting C

2009-10-23 Thread Pelle Månsson
Leandro Lucarella wrote: Andrei Alexandrescu, el 23 de octubre a las 11:09 me escribiste: Bill Baxter wrote: On Fri, Oct 23, 2009 at 5:13 AM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Yigal Chripun wrote: On 23/10/2009 13:02, bearophile wrote: Chris Nicholson-Sauls: I

Re: Targeting C

2009-10-23 Thread Leandro Lucarella
Andrei Alexandrescu, el 23 de octubre a las 11:09 me escribiste: Bill Baxter wrote: On Fri, Oct 23, 2009 at 5:13 AM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Yigal Chripun wrote: On 23/10/2009 13:02, bearophile wrote: Chris Nicholson-Sauls: I prefer this (Scala): list =

Re: [OT] Re: Targeting C

2009-10-23 Thread Ary Borenszweig
Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Fri, 23 Oct 2009 12:50:34 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: What does iota mean? http://www.digitalmars.com/d/2.0/phobos/std_range.html#iota Irony minded. I'm destroyed. Hm... this is slightly off

Re: [OT] Re: Targeting C

2009-10-23 Thread Brad Roberts
On Fri, 23 Oct 2009, Ary Borenszweig wrote: Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Fri, 23 Oct 2009 12:50:34 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: What does iota mean?

Re: Targeting C

2009-10-23 Thread grauzone
Andrei Alexandrescu wrote: Pelle Månsson wrote: Andrei Alexandrescu wrote: Yigal Chripun wrote: On 23/10/2009 13:02, bearophile wrote: Chris Nicholson-Sauls: I prefer this (Scala): list = list ++ (0 to 10) That's quite less readable. Scala sometimes has some unreadable syntax. Python

Re: Targeting C

2009-10-23 Thread grauzone
Andrei Alexandrescu wrote: Pelle Månsson wrote: Andrei Alexandrescu wrote: Yigal Chripun wrote: On 23/10/2009 13:02, bearophile wrote: Chris Nicholson-Sauls: I prefer this (Scala): list = list ++ (0 to 10) That's quite less readable. Scala sometimes has some unreadable syntax. Python

Re: Targeting C

2009-10-23 Thread Andrei Alexandrescu
grauzone wrote: Andrei Alexandrescu wrote: Pelle Månsson wrote: Andrei Alexandrescu wrote: Yigal Chripun wrote: On 23/10/2009 13:02, bearophile wrote: Chris Nicholson-Sauls: I prefer this (Scala): list = list ++ (0 to 10) That's quite less readable. Scala sometimes has some unreadable

Re: Targeting C

2009-10-22 Thread Pelle Månsson
bearophile wrote: Tim Matthews: OOC. I quite like how this one myself personally. http://ooc-lang.org/about Type of arguments can be stated once: Vector3f: class { x, y, z : Float init: func(x, y, z : Float) { this x = x // 'this' is called 'self' in some other languages this y

Re: Targeting C

2009-10-22 Thread bearophile
Pelle Månsson: Personally, I like this: foreach (i; 0..10) list ~= i; more. :) While I like this more: for (i in 0 .. 10) list ~= i; Bye, bearophile

Targeting C

2009-10-21 Thread Tim Matthews
While C may be not much from assembly and C++ a mess. C with a strapped on GC can have full power, portability which just leaves the programmer to please. Some of spotted this and instead of compiling directly, they output C code. Some examples of this are: Bitc. Combines the flexibility,