digitalmars.D - Uniform function call syntax
- Jacob Carlborg (8/8) May 26 2010 I've asked this before, probably several times: if and when will D get
- retard (9/17) May 26 2010 Are you sure you're not confusing two things.
- Simen kjaeraas (12/29) May 26 2010 ogramming
- retard (6/35) May 26 2010 I understood what you meant. It's just that the idea was invented before...
- Robert Jacques (6/41) May 26 2010 Actually, C# is, if anything, the copycat. (Convergent evolution is much...
- retard (6/55) May 27 2010 I've found articles of the proposed extension methods for C# already in
- Jacob Carlborg (4/30) May 27 2010 What he said ^
- Jacob Carlborg (5/22) May 27 2010 This was talked about at the first D conference and the term used there
- Robert Jacques (3/9) May 26 2010 Is your patch still current or does it need to be looked at?
- Jacob Carlborg (10/22) May 27 2010 1. I assume that the line numbers in the diff is not correct anymore,
I've asked this before, probably several times: if and when will D get the uniform function call syntax that has been talked about? Example: void foo (int i) {} 3.foo(); And please don't say it's already implemented because it isn't, I've heard that before. -- /Jacob Carlborg
May 26 2010
Wed, 26 May 2010 22:05:48 +0200, Jacob Carlborg wrote:I've asked this before, probably several times: if and when will D get the uniform function call syntax that has been talked about? Example: void foo (int i) {} 3.foo(); And please don't say it's already implemented because it isn't, I've heard that before.Are you sure you're not confusing two things. "The uniform access says that client code should not be affected by a decision to implement an attribute as a field or method." -- Programming in Scala The other is a term known as extension methods. "Extension methods enable you to "add" methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type." -- http:// msdn.microsoft.com/en-us/library/bb383977.aspx
May 26 2010
On Thu, 27 May 2010 01:41:16 +0200, retard <re tard.com.invalid> wrote:Wed, 26 May 2010 22:05:48 +0200, Jacob Carlborg wrote:tI've asked this before, probably several times: if and when will D ge=the uniform function call syntax that has been talked about? Example:=ogrammingvoid foo (int i) {} 3.foo(); And please don't say it's already implemented because it isn't, I've heard that before.Are you sure you're not confusing two things. "The uniform access says that client code should not be affected by a decision to implement an attribute as a =EF=AC=81eld or method." -- Pr=in Scala The other is a term known as extension methods. "Extension methods ena=bleyou to "add" methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type." -- http:=//msdn.microsoft.com/en-us/library/bb383977.aspxhttp://s3.amazonaws.com/dconf2007/WalterAndrei.pdf Page 9. The idea is that foo(bar) may be replaced with bar.foo() and vic= e versa, making function calls 'uniform' in that both member functions and= free functions may be called in the same manner. -- = Simen
May 26 2010
Thu, 27 May 2010 01:52:32 +0200, Simen kjaeraas wrote:On Thu, 27 May 2010 01:41:16 +0200, retard <re tard.com.invalid> wrote:I understood what you meant. It's just that the idea was invented before original innovator, not the copycat. Those two features have only few 'using'. The proposed D feature is more careless here.Wed, 26 May 2010 22:05:48 +0200, Jacob Carlborg wrote:http://s3.amazonaws.com/dconf2007/WalterAndrei.pdf Page 9. The idea is that foo(bar) may be replaced with bar.foo() and vice versa, making function calls 'uniform' in that both member functions and free functions may be called in the same manner.I've asked this before, probably several times: if and when will D get the uniform function call syntax that has been talked about? Example: void foo (int i) {} 3.foo(); And please don't say it's already implemented because it isn't, I've heard that before.Are you sure you're not confusing two things. "The uniform access says that client code should not be affected by a decision to implement an attribute as a field or method." -- Programming in Scala The other is a term known as extension methods. "Extension methods enable you to "add" methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type." -- http:// msdn.microsoft.com/en-us/library/bb383977.aspx
May 26 2010
On Wed, 26 May 2010 20:44:50 -0400, retard <re tard.com.invalid> wrote:Thu, 27 May 2010 01:52:32 +0200, Simen kjaeraas wrote:November 2007. Uniform function call syntax was discussed at D language conference in August 2007. And it's a logical extension from array 'Functions as Array Properties' which has been around since at least 2006.On Thu, 27 May 2010 01:41:16 +0200, retard <re tard.com.invalid> wrote:I understood what you meant. It's just that the idea was invented before original innovator, not the copycat. Those two features have only few 'using'. The proposed D feature is more careless here.Wed, 26 May 2010 22:05:48 +0200, Jacob Carlborg wrote:http://s3.amazonaws.com/dconf2007/WalterAndrei.pdf Page 9. The idea is that foo(bar) may be replaced with bar.foo() and vice versa, making function calls 'uniform' in that both member functions and free functions may be called in the same manner.I've asked this before, probably several times: if and when will D get the uniform function call syntax that has been talked about? Example: void foo (int i) {} 3.foo(); And please don't say it's already implemented because it isn't, I've heard that before.Are you sure you're not confusing two things. "The uniform access says that client code should not be affected by a decision to implement an attribute as a field or method." -- Programming in Scala The other is a term known as extension methods. "Extension methods enable you to "add" methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type." -- http:// msdn.microsoft.com/en-us/library/bb383977.aspx
May 26 2010
Wed, 26 May 2010 21:43:38 -0400, Robert Jacques wrote:On Wed, 26 May 2010 20:44:50 -0400, retard <re tard.com.invalid> wrote:in "modern" programming languages were already invented 20-50 years ago. reinvented it.Thu, 27 May 2010 01:52:32 +0200, Simen kjaeraas wrote:released November 2007. Uniform function call syntax was discussed at D language conference in August 2007. And it's a logical extension from array 'Functions as Array Properties' which has been around since at least 2006.On Thu, 27 May 2010 01:41:16 +0200, retard <re tard.com.invalid> wrote:I understood what you meant. It's just that the idea was invented invented by) the original innovator, not the copycat. Those two the symbols first with 'using'. The proposed D feature is more careless here.Wed, 26 May 2010 22:05:48 +0200, Jacob Carlborg wrote:http://s3.amazonaws.com/dconf2007/WalterAndrei.pdf Page 9. The idea is that foo(bar) may be replaced with bar.foo() and vice versa, making function calls 'uniform' in that both member functions and free functions may be called in the same manner.I've asked this before, probably several times: if and when will D get the uniform function call syntax that has been talked about? Example: void foo (int i) {} 3.foo(); And please don't say it's already implemented because it isn't, I've heard that before.Are you sure you're not confusing two things. "The uniform access says that client code should not be affected by a decision to implement an attribute as a field or method." -- Programming in Scala The other is a term known as extension methods. "Extension methods enable you to "add" methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type." -- http:// msdn.microsoft.com/en-us/library/bb383977.aspx
May 27 2010
On 2010-05-27 01.52, Simen kjaeraas wrote:On Thu, 27 May 2010 01:41:16 +0200, retard <re tard.com.invalid> wrote:What he said ^ -- /Jacob CarlborgWed, 26 May 2010 22:05:48 +0200, Jacob Carlborg wrote:http://s3.amazonaws.com/dconf2007/WalterAndrei.pdf Page 9. The idea is that foo(bar) may be replaced with bar.foo() and vice versa, making function calls 'uniform' in that both member functions and free functions may be called in the same manner.I've asked this before, probably several times: if and when will D get the uniform function call syntax that has been talked about? Example: void foo (int i) {} 3.foo(); And please don't say it's already implemented because it isn't, I've heard that before.Are you sure you're not confusing two things. "The uniform access says that client code should not be affected by a decision to implement an attribute as a field or method." -- Programming in Scala The other is a term known as extension methods. "Extension methods enable you to "add" methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type." -- http:// msdn.microsoft.com/en-us/library/bb383977.aspx
May 27 2010
On 2010-05-27 01.41, retard wrote:Wed, 26 May 2010 22:05:48 +0200, Jacob Carlborg wrote:This was talked about at the first D conference and the term used there was "uniform/unified function call syntax". -- /Jacob CarlborgI've asked this before, probably several times: if and when will D get the uniform function call syntax that has been talked about? Example: void foo (int i) {} 3.foo(); And please don't say it's already implemented because it isn't, I've heard that before.Are you sure you're not confusing two things. "The uniform access says that client code should not be affected by a decision to implement an attribute as a field or method." -- Programming in Scala The other is a term known as extension methods. "Extension methods enable you to "add" methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type." -- http:// msdn.microsoft.com/en-us/library/bb383977.aspx
May 27 2010
On Wed, 26 May 2010 16:05:48 -0400, Jacob Carlborg <doob me.com> wrote:I've asked this before, probably several times: if and when will D get the uniform function call syntax that has been talked about? Example: void foo (int i) {} 3.foo(); And please don't say it's already implemented because it isn't, I've heard that before.Is your patch still current or does it need to be looked at? (http://d.puremagic.com/issues/show_bug.cgi?id=3382)
May 26 2010
On 2010-05-27 07.17, Robert Jacques wrote:On Wed, 26 May 2010 16:05:48 -0400, Jacob Carlborg <doob me.com> wrote:1. I assume that the line numbers in the diff is not correct anymore, don't know how sensitive that is 2. As I say in the bug report literals don't work, i.e. 3.foo();, x.foo(); works though. To make 2. work I assume additional changes need to made in the lexer and/or parser. What I've heard 2. will never work until ".1" and/or "1." are not allowed anymore. -- /Jacob CarlborgI've asked this before, probably several times: if and when will D get the uniform function call syntax that has been talked about? Example: void foo (int i) {} 3.foo(); And please don't say it's already implemented because it isn't, I've heard that before.Is your patch still current or does it need to be looked at? (http://d.puremagic.com/issues/show_bug.cgi?id=3382)
May 27 2010