On 11.11.2014 22:48, silvioprog wrote:
Oh, sorry. Just:
unit Core.Singleton;
{$mode objfpc}{$H+}
interface
type
{ TSingleton }
generic TSingleton = class(TObject)
public
class function GetInstance: T;
end;
implementation
{ TSingleton }
class function TSingleton.GetInstan
Hi all,
I am not sure about the constructor case but I consider the FPC
implementation of generics much more powerful than Delphi's assuming that
Sven's comment actually works as expected.
The fact that the method invocation is actually checked on specialization
and not on declaration means that s
On Tue, Nov 11, 2014 at 5:34 PM, silvioprog wrote:
> On Sat, Nov 1, 2014 at 1:54 AM, leledumbo
> wrote:
>
>> > Hm... so I'll choose the mode delphi in my new projects to type less
>> code
>> hehe...
>>
>> You actually ended up typing much less using objfpc style generics. Think
>> of
>> how many
On Sat, Nov 1, 2014 at 9:04 AM, Sven Barth
wrote:
> On 31.10.2014 00:04, silvioprog wrote:
>
>> Hello,
>>
>> Following this article:
>>
>> http://alex.ciobanu.org/?p=51
>>
>> The compiler does not check the constructor restriction.
>>
>> Try this test:
>>
>> {$mode delphi}
>>
>>TTest = class
On Fri, Oct 31, 2014 at 10:16 PM, Flávio Etrusco
wrote:
> On Fri, Oct 31, 2014 at 12:08 PM, silvioprog wrote:
> > On Fri, Oct 31, 2014 at 11:23 AM, Sven Barth <
> pascaldra...@googlemail.com>
> > wrote:
> >>
> >> Am 30.10.2014 20:49 schrieb "silvioprog" :
> >> > TMath, constructor> = class
> >
On Sat, Nov 1, 2014 at 1:54 AM, leledumbo
wrote:
> > Hm... so I'll choose the mode delphi in my new projects to type less code
> hehe...
>
> You actually ended up typing much less using objfpc style generics. Think
> of
> how many angle brackets you would need to type in Delphi mode? And how many
El 11/11/14 a les 12:14, Michael Van Canneyt ha escrit:
>> So, what's the verdict? Will it stay this way for the foreseeable future
>> or will it be changed?
>> Should I file a bug report or should it not be considered a bug?
>
> You can file a bug report so it is not forgotten.
OK, done
http:/
On Mon, 10 Nov 2014, Luca Olivetti wrote:
El 30/10/14 a les 22:44, Michael Van Canneyt ha escrit:
On Thu, 30 Oct 2014, Luca Olivetti wrote:
Hello,
TFixedFormatDataSet (ancestor of TSdfDataSet) overrides GetRecNo
(correct) but it does a strange contortion instead of simply returning
FCurRe