Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 07/03/2012 11:08, Timon Gehr a écrit : On 03/06/2012 10:30 PM, deadalnix wrote: auto helps too. This remark was explicitly about _Java_ code style. 1/ We are not in the java's newsgroup. 2/ In java, the tooling is that awesome that you don't need to type most of it anyway.

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 07/03/2012 03:42, H. S. Teoh a écrit : On Tue, Mar 06, 2012 at 09:18:13PM -0500, Nick Sabalausky wrote: [...] But, I'm thinking this whole "dur vs duration" matter is stupid anyway. Seconds, hours, etc *are* durations. What the hell do we even need the "dur" or "duration" for anyway? I say

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 07/03/2012 02:00, F i L a écrit : I personally find it much easier to remember and use longer, more sentance-like method names. However, Jonathan and others obviously feel more comfortable writing with a high level of abbreviation, which they justify rather well. Still, if D's goal is to gain

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 07/03/2012 04:05, Bill a écrit : F i L Wrote: I personally find it much easier to remember and use longer, more sentance-like method names. However, Jonathan and others obviously feel more comfortable writing with a high level of abbreviation, which they justify rather well. Still, if D's go

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 07/03/2012 04:46, Nick Sabalausky a écrit : "Adam D. Ruppe" wrote in message news:bwqkuqhyiygvgqswi...@forum.dlang.org... On Wednesday, 7 March 2012 at 03:24:23 UTC, Jonathan M Davis wrote: I don't understand this complaint at all. curr is an incredibly common abbreviation for current. Is

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 07/03/2012 06:54, H. S. Teoh a écrit : On Wed, Mar 07, 2012 at 04:42:50AM +0100, Adam D. Ruppe wrote: On Wednesday, 7 March 2012 at 03:24:23 UTC, Jonathan M Davis wrote: I don't understand this complaint at all. curr is an incredibly common abbreviation for current. Is it your *first* choi

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 09:39:23 deadalnix wrote: > Le 07/03/2012 04:46, Nick Sabalausky a écrit : > > "Adam D. Ruppe" wrote in message > > news:bwqkuqhyiygvgqswi...@forum.dlang.org... > > > >> On Wednesday, 7 March 2012 at 03:24:23 UTC, Jonathan M Davis wrote: > >>> I don't understand this com

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 09:33:20 deadalnix wrote: > Le 07/03/2012 02:00, F i L a écrit : > > I personally find it much easier to remember and use longer, more > > sentance-like method names. However, Jonathan and others obviously feel > > more comfortable writing with a high level of abbreviation

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 09/03/2012 05:42, H. S. Teoh a écrit : On Thu, Mar 08, 2012 at 07:07:43PM -0500, Jonathan M Davis wrote: On Thursday, March 08, 2012 12:10:07 H. S. Teoh wrote: IMO, making all abbreviations in Phobos consistent would be a big step forward. You know, people keep saying that the abbreviation

Re: Multiple return values...

2012-03-09 Thread Manu
On 9 March 2012 02:59, Mantis wrote: > 09.03.2012 2:23, Manu пишет: > >> On 9 March 2012 01:56, Mantis > mail.mantis.88@gmail.**com >> wrote: >> >>[...] >> >>Is tuple required to be anonymous struct? I thought it's >>implementation details that may be done the other way if tuples >>

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Don Clugston
On 09/03/12 05:54, H. S. Teoh wrote: On Thu, Mar 08, 2012 at 07:07:04PM -0500, Nick Sabalausky wrote: [...] Heh one of us should hack up DMD to produce a NihonD, using (or at least allowing) kanji instead of the kanas wherever appropriate :) That'd be both fun to make and to use. [...] On anot

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 09:55:50 deadalnix wrote: > Le 09/03/2012 05:42, H. S. Teoh a écrit : > > On Thu, Mar 08, 2012 at 07:07:43PM -0500, Jonathan M Davis wrote: > >> On Thursday, March 08, 2012 12:10:07 H. S. Teoh wrote: > >>> IMO, making all abbreviations in Phobos consistent would be a big >

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 01:07:57 Jonathan M Davis wrote: > On Friday, March 09, 2012 09:55:50 deadalnix wrote: > > Le 09/03/2012 05:42, H. S. Teoh a écrit : > > > On Thu, Mar 08, 2012 at 07:07:43PM -0500, Jonathan M Davis wrote: > > >> On Thursday, March 08, 2012 12:10:07 H. S. Teoh wrote: > > >>

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 09/03/2012 10:07, Jonathan M Davis a écrit : On Friday, March 09, 2012 09:55:50 deadalnix wrote: Le 09/03/2012 05:42, H. S. Teoh a écrit : On Thu, Mar 08, 2012 at 07:07:43PM -0500, Jonathan M Davis wrote: On Thursday, March 08, 2012 12:10:07 H. S. Teoh wrote: IMO, making all abbreviations

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Alix Pexton
On 08/03/2012 21:08, Matt Soucy wrote: "American" does have the benefit of being more pronounceable, though...I just tried to pronounce that "oohz-ee-an", "us-ee-an", etc and they all sound odd. I say it as "Yu-Essian", it gets a lot of funny looks even after I have explained ^^ A...

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Alix Pexton
On 09/03/2012 00:07, Nick Sabalausky wrote: But yea, it would be interesting to see a langauge that was based on something very different. A German-based one would be fun. Or even better, something that doesn't use the Latin alphabet, like Japanese or Hebrew or Russian. Or Swahili (which is an a

Annotations or custom attributes

2012-03-09 Thread Manu
Does D have a nice way to add annotations or custom attributes to entities? In Java/C# for example, it is common to annotate things with useful compile time information. I'd like to be able to do that in D on occasion. For instance, I'm serialising some struct/class using reflection to some text

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 10:28:12 deadalnix wrote: > Le 09/03/2012 10:07, Jonathan M Davis a écrit : > > On Friday, March 09, 2012 09:55:50 deadalnix wrote: > >> Le 09/03/2012 05:42, H. S. Teoh a écrit : > >>> On Thu, Mar 08, 2012 at 07:07:43PM -0500, Jonathan M Davis wrote: > On Thursday, Ma

Re: [OT] American versus British spelling and pronunciation

2012-03-09 Thread Regan Heath
On Thu, 08 Mar 2012 23:27:18 -, Nick Sabalausky wrote: But anyway, to me, rolling Rs seems pretentious It seems Spanish to me ;) "Get your yappy 'perro' off my leg!" LOL :) R -- Using Opera's revolutionary email client: http://www.opera.com/mail/

Re: Annotations or custom attributes

2012-03-09 Thread Alex Rønne Petersen
On 09-03-2012 11:56, Manu wrote: Does D have a nice way to add annotations or custom attributes to entities? Unfortunately, no. In Java/C# for example, it is common to annotate things with useful compile time information. I'd like to be able to do that in D on occasion. Yes. This is a very

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 09/03/2012 11:58, Jonathan M Davis a écrit : This is not alias. This is about accepting template parameters. The actual isn't very consistent anyway (seconds, but usecs ?). It amounts to the same thing, and core.time and std.datetime are as consistent as they're going to get. seconds are _al

Re: Annotations or custom attributes

2012-03-09 Thread Jacob Carlborg
On 2012-03-09 11:56, Manu wrote: Does D have a nice way to add annotations or custom attributes to entities? Unfortunately no. In Java/C# for example, it is common to annotate things with useful compile time information. I'd like to be able to do that in D on occasion. For instance, I'm seri

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
PS: just to be clear, I do agree with most of what you said here : https://github.com/D-Programming-Language/druntime/pull/173

Re: The One-Letter Nested Function - a sample article for some kind of

2012-03-09 Thread Jos van Uden
On 13-2-2012 15:14, bearophile wrote: Zach the Mystic: void setRandomColorPair( ref ColorPair cp ) { import std.random; ubyte u(int a, int b) { return cast(ubyte) uniform(a,b); } Where possible it's good to add "static" to nested functions: Why?

Re: Annotations or custom attributes

2012-03-09 Thread Dmitry Olshansky
On 09.03.2012 14:56, Manu wrote: Does D have a nice way to add annotations or custom attributes to entities? There is a potential for them. At least technically everything with @ in front of it was supposed to be an annotation (like @property). I think it's just, sort of, reserved for future.

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Ary Manzana
On 3/9/12 6:17 AM, Jonathan M Davis wrote: On Friday, March 09, 2012 01:07:57 Jonathan M Davis wrote: On Friday, March 09, 2012 09:55:50 deadalnix wrote: Le 09/03/2012 05:42, H. S. Teoh a écrit : On Thu, Mar 08, 2012 at 07:07:43PM -0500, Jonathan M Davis wrote: On Thursday, March 08, 2012 12:

Re: Annotations or custom attributes

2012-03-09 Thread Manu
Okay, so the consensus is, it doesn't currently exist, but there is no real resistance, and is tentatively planned? Sounds good to me. On 9 March 2012 15:42, Dmitry Olshansky wrote: > On 09.03.2012 14:56, Manu wrote: > >> Does D have a nice way to add annotations or custom attributes to >> entit

Re: Creating dynamic arrays of known size

2012-03-09 Thread Andrej Mitrovic
Isn't this just as good? Key[] keys; keys.reserve(num_keys) foreach (key; keys_in_aa) keys ~= key;

Re: Multiple return values...

2012-03-09 Thread Timon Gehr
On 03/09/2012 01:23 AM, Manu wrote: I can imagine syntax using parentheses, but I don't think I'm qualified to propose a robust syntax, I don't know enough about the finer details of the grammar. Perhaps if other people agree with me, they could present some creative solutions to the syntax? I i

Re: The One-Letter Nested Function - a sample article for some kind of

2012-03-09 Thread Timon Gehr
On 03/09/2012 02:29 PM, Jos van Uden wrote: On 13-2-2012 15:14, bearophile wrote: Zach the Mystic: void setRandomColorPair( ref ColorPair cp ) { import std.random; ubyte u(int a, int b) { return cast(ubyte) uniform(a,b); } Where possible it's good to add "static" to nested functions: Why?

Re: inout and function/delegate parameters

2012-03-09 Thread Steven Schveighoffer
On Thu, 08 Mar 2012 17:43:34 -0500, Stewart Gordon wrote: On 08/03/2012 19:38, Steven Schveighoffer wrote: Yes, I couldn't really find that. It does specifically say casting away const and then modifying is invalid, but it does not say anything about "if you know the underlying data is m

Re: Creating dynamic arrays of known size

2012-03-09 Thread Steven Schveighoffer
On Fri, 09 Mar 2012 01:59:34 -0500, Jonathan M Davis wrote: On Thursday, March 08, 2012 22:05:57 H. S. Teoh wrote: On Thu, Mar 08, 2012 at 09:13:13PM -0800, H. S. Teoh wrote: > So, I'm plodding along with my AA implementation that *hopefully* will > eventually reach the point where it's usab

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Timon Gehr
On 03/08/2012 10:07 PM, H. S. Teoh wrote: On Thu, Mar 08, 2012 at 05:45:47PM -0300, Ary Manzana wrote: On 3/8/12 7:27 AM, Timon Gehr wrote: On 03/08/2012 03:14 AM, Ary Manzana wrote: Here's something I wrote today: parent_ids = results.map{|x| x['_source']['parent_ids']}.flatten.uniq.compact

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Steven Schveighoffer
On Wed, 07 Mar 2012 17:11:43 -0500, Steven Schveighoffer wrote: On Wed, 07 Mar 2012 10:25:32 -0500, Steven Schveighoffer wrote: On Wed, 07 Mar 2012 08:47:48 -0500, Steven Schveighoffer wrote: I'll see if I can do a pull request. Almost done, need to test: https://github.com/schve

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Timon Gehr
YOn 03/09/2012 09:12 AM, deadalnix wrote: Le 07/03/2012 11:08, Timon Gehr a écrit : On 03/06/2012 10:30 PM, deadalnix wrote: auto helps too. This remark was explicitly about _Java_ code style. 1/ We are not in the java's newsgroup. 2/ In java, the tooling is that awesome that you don't ne

Re: dereferencing null

2012-03-09 Thread Timon Gehr
On 03/09/2012 01:43 AM, bearophile wrote: Adam D. Ruppe: D rox the web (and has for a while). (Oh, you are starting to copy Andrei talk style now :-) The birth of community words, idioms and sub-languages is a very common thing, sociology studies such things a lot). But there's always some

Re: [OT] Smoking sections (Was: Arbitrary abbreviations in phobos considered ridiculous)

2012-03-09 Thread H. S. Teoh
On Thu, Mar 08, 2012 at 11:01:21PM -0800, Jonathan M Davis wrote: > On Friday, March 09, 2012 01:45:13 Nick Sabalausky wrote: [...] > > That's one great thing about Ohio: A few years back we had a state > > law passed here (by public vote! I had been convinced it wouldn't > > pass) prohibiting smok

Re: Annotations or custom attributes

2012-03-09 Thread bearophile
Manu: Okay, so the consensus is, it doesn't currently exist, but there is no real resistance, and is tentatively planned? Sounds good to me. As far as I know there are no concrete ideas yet for the semantics and precise usage of this feature. And I think there are different ideas regarding

Re: Multiple return values...

2012-03-09 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 03:27:14PM +0100, Timon Gehr wrote: > On 03/09/2012 01:23 AM, Manu wrote: [...] > >int x; ... (x, float y) = func(); // assign to predeclared variable(/s)? > >(x, , z) = func(); // ignore the second result value (elimination of the > >second result's code path) > > > > Thos

Re: dereferencing null

2012-03-09 Thread bearophile
Timon Gehr: Comparing signed/unsigned is perfectly reasonable. Right, but only if the numbers don't get implicit reinterpretations to other intervals, as C/C++/D do. Bye, bearophile

Re: Multiple return values...

2012-03-09 Thread Manu
On 9 March 2012 16:27, Timon Gehr wrote: > On 03/09/2012 01:23 AM, Manu wrote: > >> I can imagine syntax using parentheses, but I don't think I'm qualified >> to propose a robust syntax, I don't know enough about the finer details >> of the grammar. >> Perhaps if other people agree with me, they

Re: The One-Letter Nested Function - a sample article for some kind of

2012-03-09 Thread bearophile
Jos van Uden: On 13-2-2012 15:14, bearophile wrote: Where possible it's good to add "static" to nested functions: Why? For optimization, to be sure there's no closure allocation or a second pointer. But also for code correctness, because static functions can't use automatic variables defi

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jacob Carlborg
On 2012-03-09 15:39, Timon Gehr wrote: On 03/08/2012 10:07 PM, H. S. Teoh wrote: On Thu, Mar 08, 2012 at 05:45:47PM -0300, Ary Manzana wrote: On 3/8/12 7:27 AM, Timon Gehr wrote: On 03/08/2012 03:14 AM, Ary Manzana wrote: Here's something I wrote today: parent_ids = results.map{|x| x['_sourc

Re: Multiple return values...

2012-03-09 Thread Kevin Cox
On Mar 9, 2012 10:28 AM, "H. S. Teoh" wrote: > > On Fri, Mar 09, 2012 at 03:27:14PM +0100, Timon Gehr wrote: > > On 03/09/2012 01:23 AM, Manu wrote: > [...] > > >int x; ... (x, float y) = func(); // assign to predeclared variable(/s)? > > >(x, , z) = func(); // ignore the second result value (elim

Re: Multiple return values...

2012-03-09 Thread Timon Gehr
On 03/09/2012 04:38 PM, Manu wrote: On 9 March 2012 16:27, Timon Gehr mailto:timon.g...@gmx.ch>> wrote: On 03/09/2012 01:23 AM, Manu wrote: I can imagine syntax using parentheses, but I don't think I'm qualified to propose a robust syntax, I don't know enough about t

Re: Annotations or custom attributes

2012-03-09 Thread Manu
On 9 March 2012 17:20, bearophile wrote: > Manu: > > > Okay, so the consensus is, it doesn't currently exist, but there is no >> real >> resistance, and is tentatively planned? >> Sounds good to me. >> > > As far as I know there are no concrete ideas yet for the semantics and > precise usage of

Re: Multiple return values...

2012-03-09 Thread Manu
On 9 March 2012 17:57, Timon Gehr wrote: > On 03/09/2012 04:38 PM, Manu wrote: > >> On 9 March 2012 16:27, Timon Gehr > > wrote: >> >>On 03/09/2012 01:23 AM, Manu wrote: >> >>I can imagine syntax using parentheses, but I don't think I'm >>qualified >>

Re: Annotations or custom attributes

2012-03-09 Thread Andrei Alexandrescu
On 3/9/12 2:56 AM, Manu wrote: Does D have a nice way to add annotations or custom attributes to entities? In Java/C# for example, it is common to annotate things with useful compile time information. I'd like to be able to do that in D on occasion. For instance, I'm serialising some struct/cla

Re: Annotations or custom attributes

2012-03-09 Thread Gor Gyolchanyan
That's easy to implement and extremely ugly. On Fri, Mar 9, 2012 at 8:15 PM, Andrei Alexandrescu wrote: > On 3/9/12 2:56 AM, Manu wrote: >> >> Does D have a nice way to add annotations or custom attributes to >> entities? >> >> In Java/C# for example, it is common to annotate things with useful >

Re: Annotations or custom attributes

2012-03-09 Thread Jacob Carlborg
On 2012-03-09 17:15, Andrei Alexandrescu wrote: On 3/9/12 2:56 AM, Manu wrote: Does D have a nice way to add annotations or custom attributes to entities? In Java/C# for example, it is common to annotate things with useful compile time information. I'd like to be able to do that in D on occasio

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Brad Anderson
On Fri, Mar 9, 2012 at 1:46 AM, Jonathan M Davis wrote: > On Friday, March 09, 2012 09:33:20 deadalnix wrote: > > Le 07/03/2012 02:00, F i L a écrit : > > > I personally find it much easier to remember and use longer, more > > > sentance-like method names. However, Jonathan and others obviously fe

Re: Annotations or custom attributes

2012-03-09 Thread Manu
On 9 March 2012 18:15, Andrei Alexandrescu wrote: > On 3/9/12 2:56 AM, Manu wrote: > >> Does D have a nice way to add annotations or custom attributes to >> entities? >> >> In Java/C# for example, it is common to annotate things with useful >> compile time information. I'd like to be able to do th

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread dolive
Jonathan M Davis Wrote: > On Thursday, March 08, 2012 20:42:31 H. S. Teoh wrote: > > On Thu, Mar 08, 2012 at 07:07:43PM -0500, Jonathan M Davis wrote: > > > On Thursday, March 08, 2012 12:10:07 H. S. Teoh wrote: > > > > IMO, making all abbreviations in Phobos consistent would be a big > > > > step

Re: Annotations or custom attributes

2012-03-09 Thread Michel Fortin
On 2012-03-09 16:15:30 +, Andrei Alexandrescu said: I think a good approach in D would be to define mixins that work in conjunction with the feature involved, for example: class A { int thing; mixin(DoNotSerialize!"thing"); ... } or together: class A { mixin(DoNotSe

Re: Annotations or custom attributes

2012-03-09 Thread Manu
On 9 March 2012 19:23, Michel Fortin wrote: > On 2012-03-09 16:15:30 +, Andrei Alexandrescu < > seewebsiteforem...@erdani.org**> said: > > I think a good approach in D would be to define mixins that work in >> conjunction with the feature involved, for example: >> >> class A { >> int thi

Re: Multiple return values...

2012-03-09 Thread Timon Gehr
On 03/09/2012 05:14 PM, Manu wrote: On 9 March 2012 17:57, Timon Gehr mailto:timon.g...@gmx.ch>> wrote: On 03/09/2012 04:38 PM, Manu wrote: On 9 March 2012 16:27, Timon Gehr mailto:timon.g...@gmx.ch> >> wrote:

Re: Multiple return values...

2012-03-09 Thread Timon Gehr
On 03/09/2012 05:14 PM, Manu wrote: What I mean is this: retTuple = func(); someStruct.x = retTuple[0]; y = retTuple[1]; // retTuple[2] is ignored, but the intent is not clear in the code as it was in my prior example, I like how my prior example makes this intent explicit int err = retTuple[3];

Re: Creating dynamic arrays of known size

2012-03-09 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 03:10:21PM +0100, Andrej Mitrovic wrote: > Isn't this just as good? > > Key[] keys; > keys.reserve(num_keys) > foreach (key; keys_in_aa) >keys ~= key; I suppose that should work. Although it does open up a new can of worms: reserve is @system and also impure. I can se

Re: Multiple return values...

2012-03-09 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 07:16:19PM +0100, Timon Gehr wrote: [...] > Another issue is that people would complain about auto-flattening all > the time once built-in tuples get more accessible, even though it is > not actually a problem. It would be just due to the fact that it does > not occur in mos

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Nick Sabalausky
"Alix Pexton" wrote in message news:jjcn41$2g4g$1...@digitalmars.com... > > and I have a theory that poetic languages would be good for programming > in. > http://shakespearelang.sourceforge.net/ Hello World: http://shakespearelang.sourceforge.net/report/shakespeare/shakespeare.html#sec:hello

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Nick Sabalausky
"Ary Manzana" wrote in message news:jjd21r$6ni$1...@digitalmars.com... > > Sample Ruby session: > > > irb > ruby-1.8.7-p352 :001 > [1, 2, 3].count > => 3 > ruby-1.8.7-p352 :002 > [1, 2, 3].length > => 3 > ruby-1.8.7-p352 :003 > [1, 2, 3].size > => 3 > > I never saw *anyone* complaining about t

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 10:01:19 Brad Anderson wrote: > On Fri, Mar 9, 2012 at 1:46 AM, Jonathan M Davis wrote: > > On Friday, March 09, 2012 09:33:20 deadalnix wrote: > > > Le 07/03/2012 02:00, F i L a écrit : > > > > I personally find it much easier to remember and use longer, more > > > > sent

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 01:29:03PM -0500, Nick Sabalausky wrote: > "Alix Pexton" wrote in message > news:jjcn41$2g4g$1...@digitalmars.com... > > > > and I have a theory that poetic languages would be good for programming > > in. > > > > http://shakespearelang.sourceforge.net/ > > Hello World:

Re: Multiple return values...

2012-03-09 Thread bearophile
H. S. Teoh: > Perl auto-flattens lists. Maybe they have fixed this big design mistake in Perl6. Bye, bearophile

Re: Annotations or custom attributes

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 16:00:03 Manu wrote: > Okay, so the consensus is, it doesn't currently exist, but there is no real > resistance, and is tentatively planned? > Sounds good to me. I wouldn't really say that it's tentatively planned. I don't recall Walter ever weighing in on it at all, and

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 01:34:38PM -0500, Nick Sabalausky wrote: > "Ary Manzana" wrote in message > news:jjd21r$6ni$1...@digitalmars.com... > > > > Sample Ruby session: > > > > > irb > > ruby-1.8.7-p352 :001 > [1, 2, 3].count > > => 3 > > ruby-1.8.7-p352 :002 > [1, 2, 3].length > > => 3 > > rub

Re: Multiple return values...

2012-03-09 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 02:01:34PM -0500, bearophile wrote: > H. S. Teoh: > > > Perl auto-flattens lists. > > Maybe they have fixed this big design mistake in Perl6. [...] Whether or not it was a mistake is debatable. It does have its uses... though forcing everyone to use references to prevent

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Alix Pexton
On 09/03/2012 18:29, Nick Sabalausky wrote: "Alix Pexton" wrote in message news:jjcn41$2g4g$1...@digitalmars.com... and I have a theory that poetic languages would be good for programming in. http://shakespearelang.sourceforge.net/ Hello World: http://shakespearelang.sourceforge.net/report

Re: Multiple return values...

2012-03-09 Thread Manfred Nowak
Manu wrote: > By contrast, multiple return values are quite the opposite. They > are explicitly NON-STRUCTURED. > The presumption in this case is that multiple resturn > values would follow the exact same set of rules as passing > multiple args TO a function, but in reverse. this seams to stat

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Ary Manzana
On 3/9/12 4:09 PM, H. S. Teoh wrote: On Fri, Mar 09, 2012 at 01:34:38PM -0500, Nick Sabalausky wrote: "Ary Manzana" wrote in message news:jjd21r$6ni$1...@digitalmars.com... Sample Ruby session: irb ruby-1.8.7-p352 :001> [1, 2, 3].count => 3 ruby-1.8.7-p352 :002> [1, 2, 3].length =>

Re: Multiple return values...

2012-03-09 Thread Manu
On 9 March 2012 22:39, Manfred Nowak wrote: > Manu wrote: > > > > By contrast, multiple return values are quite the opposite. They > > are explicitly NON-STRUCTURED. > > > The presumption in this case is that multiple resturn > > values would follow the exact same set of rules as passing > > mult

Re: Multiple return values...

2012-03-09 Thread a
I'm finding HEAPS of SIMD functions want to return pairs (unpacks in particular): int4 (low, hight) = unpack(someShort8); Currently I have to duplicate everyting: int4 low = unpackLow(someShort8); int4 high = unpackHigh(someShort8); I'm getting really sick of that, it feels so... last millennium.

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:jjdru9$1rv5$1...@digitalmars.com... > "Nick Sabalausky" wrote in message > news:jj6gjm$2m6a$1...@digitalmars.com... >> >> But, I'm thinking this whole "dur vs duration" matter is stupid anyway. >> Seconds, hours, etc *are* durations. What the hell do we

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:jj6gjm$2m6a$1...@digitalmars.com... > > But, I'm thinking this whole "dur vs duration" matter is stupid anyway. > Seconds, hours, etc *are* durations. What the hell do we even need the > "dur" or "duration" for anyway? > > I say fuck it: Let's just toss t

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Nick Sabalausky
"Ary Manzana" wrote in message news:jjdqe4$1oeb$1...@digitalmars.com... > > Indeed, count can be used to count elements: > > ruby-1.8.7-p352 :002 > [1, 2, 3, 3, 3].count 3 > => 3 > ruby-1.8.7-p352 :004 > [1, 2, 3, 3, 3].count &:odd? > => 4 > ruby-1.8.7-p352 :005 > [1, 2, 3, 3, 3].count { |x| x

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Ary Manzana
On 3/9/12 6:21 PM, Nick Sabalausky wrote: "Ary Manzana" wrote in message news:jjdqe4$1oeb$1...@digitalmars.com... Indeed, count can be used to count elements: ruby-1.8.7-p352 :002> [1, 2, 3, 3, 3].count 3 => 3 ruby-1.8.7-p352 :004> [1, 2, 3, 3, 3].count&:odd? => 4 ruby-1.8.7-p352 :005

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Steven Schveighoffer
On Fri, 09 Mar 2012 16:14:08 -0500, Nick Sabalausky wrote: "Nick Sabalausky" wrote in message news:jj6gjm$2m6a$1...@digitalmars.com... But, I'm thinking this whole "dur vs duration" matter is stupid anyway. Seconds, hours, etc *are* durations. What the hell do we even need the "dur" or "dura

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 16:36:27 Steven Schveighoffer wrote: > On Fri, 09 Mar 2012 16:14:08 -0500, Nick Sabalausky wrote: > > "Nick Sabalausky" wrote in message > > news:jj6gjm$2m6a$1...@digitalmars.com... > > > >> But, I'm thinking this whole "dur vs duration" matter is stupid anyway. > >> Se

Can getHash be made pure?

2012-03-09 Thread H. S. Teoh
Still chugging away at implementing AA's in druntime proper, I reviewed the code for methods that can be marked pure but ran into a major road block: getHash() is not marked pure. That makes a lot of AA methods impure, that could, and probably should, be marked pure. Is it possible to make TypeInf

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Adam D. Ruppe
On Friday, 9 March 2012 at 21:36:28 UTC, Steven Schveighoffer wrote: I can't say I agree with this, as it pollutes the global namespace with several common terms that could be used for fields. There's no such thing as a global namespace in D, and field names wouldn't be affected even if there

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Nick Sabalausky
"Steven Schveighoffer" wrote in message news:op.waxaa1s1eav7ka@localhost.localdomain... > On Fri, 09 Mar 2012 16:14:08 -0500, Nick Sabalausky wrote: > >> "Nick Sabalausky" wrote in message >> news:jj6gjm$2m6a$1...@digitalmars.com... >>> >>> But, I'm thinking this whole "dur vs duration" matter

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Nick Sabalausky
"Jonathan M Davis" wrote in message news:mailman.357.1331329638.4860.digitalmar...@puremagic.com... > On Friday, March 09, 2012 16:36:27 Steven Schveighoffer wrote: >> On Fri, 09 Mar 2012 16:14:08 -0500, Nick Sabalausky wrote: >> > "Nick Sabalausky" wrote in message >> > news:jj6gjm$2m6a$1...@d

Re: Can getHash be made pure?

2012-03-09 Thread Walter Bright
On 3/9/2012 1:54 PM, H. S. Teoh wrote: Still chugging away at implementing AA's in druntime proper, I reviewed the code for methods that can be marked pure but ran into a major road block: getHash() is not marked pure. That makes a lot of AA methods impure, that could, and probably should, be mar

Breaking backwards compatiblity

2012-03-09 Thread Walter Bright
This statement is from Linus Torvalds about breaking binary compatibility: https://lkml.org/lkml/2012/3/8/495 While I don't think we need to worry so much at the moment about breaking binary compatibility with new D releases, we do have a big problem with breaking source code compatibility.

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:jjdu0j$209o$1...@digitalmars.com... >> I can't say I agree with this, as it pollutes the global namespace with >> several common terms that could be used for fields. >> > > I'd argue that should not be considered a problem in this case: > http://forum.dlan

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Steven Schveighoffer
On Fri, 09 Mar 2012 16:47:01 -0500, Jonathan M Davis wrote: On Friday, March 09, 2012 16:36:27 Steven Schveighoffer wrote: On Fri, 09 Mar 2012 16:14:08 -0500, Nick Sabalausky wrote: > "Nick Sabalausky" wrote in message > news:jj6gjm$2m6a$1...@digitalmars.com... > >> But, I'm thinking this

Re: Breaking backwards compatiblity

2012-03-09 Thread Timon Gehr
On 03/09/2012 11:32 PM, Walter Bright wrote: This statement is from Linus Torvalds about breaking binary compatibility: https://lkml.org/lkml/2012/3/8/495 While I don't think we need to worry so much at the moment about breaking binary compatibility with new D releases, we do have a big problem

Re: Breaking backwards compatiblity

2012-03-09 Thread Walter Bright
On 3/9/2012 2:41 PM, Timon Gehr wrote: On 03/09/2012 11:32 PM, Walter Bright wrote: This statement is from Linus Torvalds about breaking binary compatibility: https://lkml.org/lkml/2012/3/8/495 While I don't think we need to worry so much at the moment about breaking binary compatibility with

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Steven Schveighoffer
On Fri, 09 Mar 2012 17:38:08 -0500, Nick Sabalausky wrote: "Nick Sabalausky" wrote in message news:jjdu0j$209o$1...@digitalmars.com... I can't say I agree with this, as it pollutes the global namespace with several common terms that could be used for fields. I'd argue that should not be co

Re: Breaking backwards compatiblity

2012-03-09 Thread Alex Rønne Petersen
On 09-03-2012 23:32, Walter Bright wrote: This statement is from Linus Torvalds about breaking binary compatibility: https://lkml.org/lkml/2012/3/8/495 While I don't think we need to worry so much at the moment about breaking binary compatibility with new D releases, we do have a big problem wi

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Steven Schveighoffer
On Fri, 09 Mar 2012 16:50:22 -0500, Adam D. Ruppe wrote: On Friday, 9 March 2012 at 21:36:28 UTC, Steven Schveighoffer wrote: I can't say I agree with this, as it pollutes the global namespace with several common terms that could be used for fields. There's no such thing as a global names

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 17:41:01 Steven Schveighoffer wrote: > I'll say I *don't* agree with the rejection of aliases on principle -- > aliases can be extremely useful/helpful, and they cost literally nothing > (the "cognitive cost" on the docs is a BS argument IMO). I just don't > agree with con

Re: Breaking backwards compatiblity

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 14:44:05 Walter Bright wrote: > On 3/9/2012 2:41 PM, Timon Gehr wrote: > > On 03/09/2012 11:32 PM, Walter Bright wrote: > >> This statement is from Linus Torvalds about breaking binary > >> compatibility: > >> > >> https://lkml.org/lkml/2012/3/8/495 > >> > >> While I don

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Adam D. Ruppe
On Friday, 9 March 2012 at 22:54:37 UTC, Steven Schveighoffer wrote: Again, I find this just as descriptive and not terrible to type: Yeah, that's fine by me (though duration is still better than dur :-D ) I'm just the name conflict isn't a big deal either since writing ".minutes" in some plac

Re: Multiple return values...

2012-03-09 Thread Manfred Nowak
Manu wrote: > I'm just talking about the ABI for returning multiple values, not > chaining Does this mean, that you want a special type of "function"? For example this would be disallowed statement: `auto result= f( g( parameters));', if `f' and `g' are functions returning multiple values? U

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Brad Anderson
On Fri, Mar 9, 2012 at 3:56 PM, Jonathan M Davis wrote: > On Friday, March 09, 2012 17:41:01 Steven Schveighoffer wrote: > > I'll say I *don't* agree with the rejection of aliases on principle -- > > aliases can be extremely useful/helpful, and they cost literally nothing > > (the "cognitive cost"

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Andrei Alexandrescu
On 3/9/12 5:54 AM, Ary Manzana wrote: Sample Ruby session: > irb ruby-1.8.7-p352 :001 > [1, 2, 3].count => 3 ruby-1.8.7-p352 :002 > [1, 2, 3].length => 3 ruby-1.8.7-p352 :003 > [1, 2, 3].size => 3 I never saw *anyone* complaining about this. When you write, you choose whatever is convenient to

Re: Breaking backwards compatiblity

2012-03-09 Thread Nick Sabalausky
"Walter Bright" wrote in message news:jje0er$24mb$1...@digitalmars.com... > This statement is from Linus Torvalds about breaking binary compatibility: > > https://lkml.org/lkml/2012/3/8/495 > > While I don't think we need to worry so much at the moment about breaking > binary compatibility with

Re: Breaking backwards compatiblity

2012-03-09 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 11:46:24PM +0100, Alex Rønne Petersen wrote: > On 09-03-2012 23:32, Walter Bright wrote: > >This statement is from Linus Torvalds about breaking binary compatibility: > > > >https://lkml.org/lkml/2012/3/8/495 > > > >While I don't think we need to worry so much at the moment

Re: Breaking backwards compatiblity

2012-03-09 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:jje2cg$27tg$1...@digitalmars.com... > "Walter Bright" wrote in message > news:jje0er$24mb$1...@digitalmars.com... >> This statement is from Linus Torvalds about breaking binary >> compatibility: >> >> https://lkml.org/lkml/2012/3/8/495 >> >> While I don'

  1   2   3   >