Re: [fpc-devel] Feature announcement: Type helpers

2013-02-07 Thread Thaddy
On 6-2-2013 12:13, Henry Vermaak wrote: What I'm trying to say with this (admittedly contrived) example is that when you are forced to read the docs to find out which functions you can use for converting numbers to strings, you'll probably discover functions like Format. At least in my case,

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Michael Van Canneyt
On Wed, 6 Feb 2013, Sven Barth wrote: Hello Free Pascal community! I'm pleased to announce the addition of type helpers which extend the existing helper concept with the ability to extend primitive types. Haha, finally after 7 years of waiting we catch up with Morfik... Thank you very

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: With helpers you can do i.ctrl-space and get a list of methods, for example ToString; Which, for newbies, is easier than guessing IntToStr() We'll have to make some units with 'standard' helpers. Well, newbies are not to strong in

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Michael Van Canneyt
On Wed, 6 Feb 2013, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: With helpers you can do i.ctrl-space and get a list of methods, for example ToString; Which, for newbies, is easier than guessing IntToStr() We'll have to make some units with 'standard'

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: Well, newbies are not to strong in knowing what is which unit either :-) If we're talking newbies and IDE: They don't need to, if the IDE puts the unit in the uses clause to start with... That's completely new functionality. Afaik most

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Michael Van Canneyt
On Wed, 6 Feb 2013, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: Well, newbies are not to strong in knowing what is which unit either :-) If we're talking newbies and IDE: They don't need to, if the IDE puts the unit in the uses clause to start with...

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Mattias Gaertner
Marco van de Voort mar...@stack.nl hat am 6. Februar 2013 um 11:41 geschrieben: In our previous episode, Michael Van Canneyt said: Well, newbies are not to strong in knowing what is which unit either :-) If we're talking newbies and IDE: They don't need to, if the IDE puts the unit in

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Mattias Gaertner
Michael Van Canneyt mich...@freepascal.org hat am 6. Februar 2013 um 11:38 geschrieben: On Wed, 6 Feb 2013, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: With helpers you can do i.ctrl-space and get a list of methods, for example ToString; Which, for

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Henry Vermaak
On Wed, Feb 06, 2013 at 11:52:27AM +0100, Michael Van Canneyt wrote: On Wed, 6 Feb 2013, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: Well, newbies are not to strong in knowing what is which unit either :-) If we're talking newbies and IDE: They don't

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Roberto P.
2013/2/6 Michael Van Canneyt mich...@freepascal.org On Wed, 6 Feb 2013, Marco van de Voort wrote: Anyway, I just wanted to point out which advantages I see (or do not see) in type helpers. By themselves, I think they are worthless. If used appropriately, they can improve the readability.

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Michael Schnell
On 02/06/2013 12:13 PM, Henry Vermaak wrote: I can see the point, but can't help to think that I'll be reading code like this soon: s := '(' + x.ToString + ', ' + y.ToString + ')'; Instead of s := Format('(%d, %d)', [x, y]); In fact to me the first expression does look really nice (even

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Michael Van Canneyt
On Wed, 6 Feb 2013, Henry Vermaak wrote: On Wed, Feb 06, 2013 at 11:52:27AM +0100, Michael Van Canneyt wrote: On Wed, 6 Feb 2013, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: Well, newbies are not to strong in knowing what is which unit either :-) If

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Michael Schnell
On 02/06/2013 12:29 PM, Michael Schnell wrote: point.x := x; point.y := y; s := point.ToString; or s := (x,y).ToString; Has there not recently been a discussion on Tupels ?!?!?! :-) -Michael ___ fpc-devel maillist -

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Paul Ishenin
06.02.13, 19:29, Michael Schnell пишет: but I feel point.x := x; point.y := y; s := point.ToString; is most clear. This is what you can already do in FPC 2.6.0 with advanced records feature active. Best regards, Paul Ishenin ___

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Sven Barth
Am 06.02.2013 10:58, schrieb Mattias Gaertner: On Wed, 06 Feb 2013 10:49:36 +0100 Sven Barth pascaldra...@googlemail.com wrote: [...] Hello Free Pascal community! === example begin === var i: LongInt; begin Writeln(i.ToString); end. And how is toString declared? I've mentioned it

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Henry Vermaak
On Wed, Feb 06, 2013 at 01:12:59PM +0100, Sven Barth wrote: Am 06.02.2013 12:13, schrieb Henry Vermaak: Thanks for pointing out the advantages. I can see the point, but can't help to think that I'll be reading code like this soon: s := '(' + x.ToString + ', ' + y.ToString + ')'; Instead

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Ludo Brands
On 02/06/2013 01:12 PM, Sven Barth wrote: Am 06.02.2013 12:13, schrieb Henry Vermaak: Thanks for pointing out the advantages. I can see the point, but can't help to think that I'll be reading code like this soon: s := '(' + x.ToString + ', ' + y.ToString + ')'; Instead of s :=

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Sven Barth
Am 06.02.2013 14:26, schrieb Ludo Brands: On 02/06/2013 01:12 PM, Sven Barth wrote: Am 06.02.2013 12:13, schrieb Henry Vermaak: Thanks for pointing out the advantages. I can see the point, but can't help to think that I'll be reading code like this soon: s := '(' + x.ToString + ', ' +

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Sven Barth
Am 06.02.2013 14:03, schrieb Henry Vermaak: On Wed, Feb 06, 2013 at 01:12:59PM +0100, Sven Barth wrote: Am 06.02.2013 12:13, schrieb Henry Vermaak: Thanks for pointing out the advantages. I can see the point, but can't help to think that I'll be reading code like this soon: s := '(' +

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Sven Barth
Am 06.02.2013 12:54, schrieb Paul Ishenin: 06.02.13, 19:29, Michael Schnell пишет: but I feel point.x := x; point.y := y; s := point.ToString; is most clear. This is what you can already do in FPC 2.6.0 with advanced records feature active. Or by using record helpers if one can

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Mark Morgan Lloyd
Ludo Brands wrote: Funny to see that all these fans of a strongly typed pascal prefer Format() that is using variants, has an undetermined number of parameters, doesn't give the compiler any opportunity to check the types used and causes runtime errors when a wrong type or a wrong number of

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Alexander Klenin
On Wed, Feb 6, 2013 at 10:31 PM, Michael Schnell mschn...@lumino.de wrote: point.x := x; point.y := y; s := point.ToString; or s := (x,y).ToString; Has there not recently been a discussion on Tupels ?!?!?! :-) At least according to my proposal, tuples will not be a type, so

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Paul Ishenin
06.02.13, 21:51, Alexander Klenin пишет: On Wed, Feb 6, 2013 at 10:31 PM, Michael Schnell mschn...@lumino.de wrote: point.x := x; point.y := y; s := point.ToString; or s := (x,y).ToString; Has there not recently been a discussion on Tupels ?!?!?! :-) At least according to my