Re: [fpc-devel] type discussion

2005-06-06 Thread Hans-Peter Diettrich
Danny Milosavljevic wrote: > > > > Garbage collection is largely no issue when using the Owner concept in > > > > TComponent, using TObjectList, etc. > > > > > > True and thats why I suggested ref counting Tobjects only so that no > > > manual memory management is required. I tend to make heavy u

Re: [fpc-devel] type discussion

2005-06-04 Thread Jamie McCracken
Danny Milosavljevic wrote: you *might* have less overhead using ref count on a tstringlist then making it a component (if you are creating more than one reference to it or passing it as a parameter to a function then yes a component would be more efficient). You also have the problem of what y

Re: [fpc-devel] type discussion

2005-06-04 Thread Danny Milosavljevic
Hi, Am Samstag, den 04.06.2005, 16:02 +0100 schrieb Jamie McCracken: > Danny Milosavljevic wrote: > > > > I'd suggest creating tlist, tstringlist, tfilestream-like things with an > > optional owner (TComponent-like). I've been programming delphi for > > years, and trust me, I know how annoying ke

Re: [fpc-devel] type discussion

2005-06-04 Thread Jamie McCracken
Danny Milosavljevic wrote: I'd suggest creating tlist, tstringlist, tfilestream-like things with an optional owner (TComponent-like). I've been programming delphi for years, and trust me, I know how annoying keeping track of tlist memory is (and I mean _annoying like [EMAIL PROTECTED] hell_ :)).

Re: [fpc-devel] type discussion

2005-06-04 Thread Danny Milosavljevic
Hi, Am Samstag, den 04.06.2005, 08:53 +0200 schrieb Hans-Peter Diettrich: > Jamie McCracken wrote: > > > > Garbage collection is largely no issue when using the Owner concept in > > > TComponent, using TObjectList, etc. > > > > True and thats why I suggested ref counting Tobjects only so that n

Re: [fpc-devel] type discussion

2005-06-03 Thread Hans-Peter Diettrich
Jamie McCracken wrote: > > Garbage collection is largely no issue when using the Owner concept in > > TComponent, using TObjectList, etc. > > True and thats why I suggested ref counting Tobjects only so that no > manual memory management is required. I tend to make heavy use of TList, > Tstringl

Re: [fpc-devel] type discussion

2005-06-03 Thread Vinzent Hoefler
On Friday 03 June 2005 14:52, Sebastian Kaliszewski wrote: > Vinzent Hoefler wrote: > >>If you didn't notice I wrote "C nothwithstanding". C is far away > >> from modern high level languages (and also many older than it but > >> hight level languages). > > > > It's not much worse than C++ in typic

Re: [fpc-devel] type discussion

2005-06-03 Thread Sebastian Kaliszewski
Vinzent Hoefler wrote: If you didn't notice I wrote "C nothwithstanding". C is far away from modern high level languages (and also many older than it but hight level languages). It's not much worse than C++ in typical projects (which has, I admit, much to do with the people using it). Of cou

Re: [fpc-devel] type discussion

2005-06-03 Thread Vinzent Hoefler
On Thursday 02 June 2005 15:53, Sebastian Kaliszewski wrote: > Vinzent Hoefler wrote: > > On Thursday 02 June 2005 13:54, Sebastian Kaliszewski wrote: > > > > No, they aren't (or let me put it this way: It depends on what you > > measure). For instance, studies indicate that there are ten times > >

Re: [fpc-devel] type discussion

2005-06-02 Thread Angelo Bertolli
Well pascal in the only mainstream langugae that does that - I dont see the pont and it aint magic. Jamie, now I KNOW I don't understand where you're coming from Pascal? Mainstream? ;) ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] type discussion

2005-06-02 Thread Hans-Peter Diettrich
Jamie McCracken wrote: > >>>I don't understand, why are these forward declarations so evil ? > >>> > >> > >>More code bloat, more typing and they get in the way. They dont give me > >>anything useful in return. > > > > > > Please show me a piece of code where they are "in the way". Code bloat? >

Re: [fpc-devel] type discussion

2005-06-02 Thread Angelo Bertolli
And do you think they dumped Delphi because Borland is virtually bankrupt and is basically only trying to become yet another .Net platform, or because they think they are so much more productive with the C# *syntax* ? No, of course they're using it because Microsoft said so ;) __

Re: [fpc-devel] type discussion

2005-06-02 Thread Angelo Bertolli
the C-style operators += etc. should better be written as +:= since C has = as assignment, Pascal has := as assignment symbol := means "assign to", += means "add to" etc., I cannot find any inconsistency here. Also, += and such were created to make it easier to convert C code. If y

Re: [fpc-devel] type discussion

2005-06-02 Thread Christian Iversen
On Thursday 02 June 2005 21:28, L505 wrote: > | > In C++: > | > > | > TStringList strlist; > | > > | > strlist = new TStringList; > | > > | > How is that shorter ? > | > | okay but its still redundant. Why does the compiler need to have it > | spelt out twice? Why cant the compiler deduce that as t

Re: [fpc-devel] type discussion

2005-06-02 Thread L505
| > In C++: | > | > TStringList strlist; | > | > strlist = new TStringList; | > | > How is that shorter ? | | okay but its still redundant. Why does the compiler need to have it | spelt out twice? Why cant the compiler deduce that as the pointer is | declared as TStringlist therefore it crea

Re: [fpc-devel] type discussion

2005-06-02 Thread L505
| More code bloat, more typing and they get in the way. They dont give me | anything useful in return. Why do you even bother using Pascal, it seems you obviously do not like one bit about it. | | | > Garbage collection is largely no issue when using the Owner concept in TComponent, using TOb

Re: [fpc-devel] type discussion

2005-06-02 Thread Hans-Peter Diettrich
Jamie McCracken wrote: > >>However, in general Pascal has poor developer productivity when > >>compared to modern languages like python and C#. > > > > > > In terms of _written_ or in terms of _working_ lines of code? :-> Can't stop refraining that fact ;-) > Dont kid yourself - a lot of my fell

Re: [fpc-devel] type discussion

2005-06-02 Thread Uberto Barbini
> > This only shows the implementation (and std library design) is bad (and > > that's true at least to java 1.4) > > I hear this from nearly any language with automated allocation (C#, Python, > Perl, Java). The concept is simple and attractive, the practice seems to > be different. I'm not a gre

Re: [fpc-devel] type discussion

2005-06-02 Thread Marco van de Voort
> Marco van de Voort wrote: > > I think the time spent doing the manual compilation is overestimated, and > > the time problem solving in automatic allocation is underestimated. > > > > How many Java programmers routine set references to NIL ? Really a lot... > > This only shows the implementatio

Re: [fpc-devel] type discussion

2005-06-02 Thread Marco van de Voort
> The difference was that the same task could be coded in some languages > using significantly lesser number of lines. But that doesn't necessarily equal to less overall time. Also specially the size of the testing code pieces. The troubles typically only start when the program grows larger.

Re: [fpc-devel] type discussion

2005-06-02 Thread Sebastian Kaliszewski
Marco van de Voort wrote: I think the time spent doing the manual compilation is overestimated, and the time problem solving in automatic allocation is underestimated. How many Java programmers routine set references to NIL ? Really a lot... This only shows the implementation (and std library

Re: [fpc-devel] type discussion

2005-06-02 Thread Michael Van Canneyt
On Thu, 2 Jun 2005, Ales Katona wrote: > > > > > http://shootout.alioth.debian.org/benchmark.php?test=all&lang=fpascal&lang2=ocaml&sort=fullcpu > > > > > > > > Here comes Pascal (FPC) vs Ocaml (hybrid functional/imperative language > > with OO). Ocaml is significantly faster although it ha

Re: [fpc-devel] type discussion

2005-06-02 Thread Marco van de Voort
> On Thursday 02 June 2005 13:54, Sebastian Kaliszewski wrote: > > probably the greaytest impact on Objective Pascal productioveness > > would come from allowing programmers to declare classes like self > > managing (self freeing, not needeing explicit destructions). > > Maybe, yes. But I'm old sc

Re: [fpc-devel] type discussion

2005-06-02 Thread Ales Katona
http://shootout.alioth.debian.org/benchmark.php?test=all&lang=fpascal&lang2=ocaml&sort=fullcpu Here comes Pascal (FPC) vs Ocaml (hybrid functional/imperative language with OO). Ocaml is significantly faster although it havily uses GC. Ocaml code is significantly shorter too (they can be c

Re: [fpc-devel] type discussion

2005-06-02 Thread Sebastian Kaliszewski
Vinzent Hoefler wrote: On Thursday 02 June 2005 13:54, Sebastian Kaliszewski wrote: No, they aren't (or let me put it this way: It depends on what you measure). For instance, studies indicate that there are ten times more errors code in C code then in Ada code once you've delivered the softwa

Re: [fpc-devel] type discussion

2005-06-02 Thread Jamie McCracken
Vinzent Hoefler wrote: On Thursday 02 June 2005 15:16, Uberto Barbini wrote: If the goal is this, I'd prefear a way to declare objects autocreated: varauto: strlist: TStringList; begin //some stuff end; [...] It could be a problem to pass parameters to the constructor. Yes, exactly.

Re: [fpc-devel] type discussion

2005-06-02 Thread Vinzent Hoefler
On Thursday 02 June 2005 15:16, Uberto Barbini wrote: > If the goal is this, I'd prefear a way to declare objects > autocreated: > > varauto: > strlist: TStringList; > begin > //some stuff > end; [...] > > It could be a problem to pass parameters to the constructor. Yes, exactly. So why both

Re: [fpc-devel] type discussion

2005-06-02 Thread Christian Iversen
> >>>Sorry, the only language that does what ? > >> > >>var strlist : TStringlist; > >>strlist := Tstringlist.create; > >> > >>I know strlist is a Tstringlist, the compiler knows it too as I have > >>declared it so why do I have to spell it out in the creation process? > > > > In C++: > > > > TStri

Re: [fpc-devel] type discussion

2005-06-02 Thread Uberto Barbini
On Thursday 02 June 2005 17:07, Marc Weustink wrote: > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Jamie > McCracken > Sent: donderdag 2 juni 2005 16:32 > > >var strlist : TStringlist; > >strlist := Tstringlist.create; If the goal is this, I'd prefear a way to declare objects aut

RE: [fpc-devel] type discussion

2005-06-02 Thread Marc Weustink
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jamie McCracken Sent: donderdag 2 juni 2005 16:32 >var strlist : TStringlist; >strlist := Tstringlist.create; > >I know strlist is a Tstringlist, the compiler knows it too as I have >declared it so why do I have to spell it out in the cr

Re: [fpc-devel] type discussion

2005-06-02 Thread Micha Nelissen
On Thu, 02 Jun 2005 15:54:54 +0200 Sebastian Kaliszewski <[EMAIL PROTECTED]> wrote: > The studies show that in high level languages (C nothwithstanding) there is > very evident but simple correlation -- number of programmer errors per > language construct (typically in not obfuscated code it's v

Re: [fpc-devel] type discussion

2005-06-02 Thread Jamie McCracken
Micha Nelissen wrote: On Thu, 02 Jun 2005 15:31:51 +0100 Jamie McCracken <[EMAIL PROTECTED]> wrote: Micha Nelissen wrote: I don't understand, why are these forward declarations so evil ? More code bloat, more typing and they get in the way. They dont give me anything useful in return.

Re: [fpc-devel] type discussion

2005-06-02 Thread Vinzent Hoefler
On Thursday 02 June 2005 13:54, Sebastian Kaliszewski wrote: > Vinzent Hoefler wrote: > > On Thursday 02 June 2005 13:04, Jamie McCracken wrote: > >>However, in general Pascal has poor developer productivity when > >>compared to modern languages like python and C#. > > > > In terms of _written_ or

Re: [fpc-devel] type discussion

2005-06-02 Thread Micha Nelissen
On Thu, 02 Jun 2005 15:31:51 +0100 Jamie McCracken <[EMAIL PROTECTED]> wrote: > Micha Nelissen wrote: > > > I don't understand, why are these forward declarations so evil ? > > > > More code bloat, more typing and they get in the way. They dont give me > anything useful in return. Please sho

Re: [fpc-devel] type discussion

2005-06-02 Thread Michael Van Canneyt
var strlist : TStringlist; strlist := Tstringlist.create; I know strlist is a Tstringlist, the compiler knows it too as I have declared it so why do I have to spell it out in the creation process? For 2 reasons: First, with strlist.create; It is not clear whether strlist is already initia

Re: [fpc-devel] type discussion

2005-06-02 Thread Jamie McCracken
Micha Nelissen wrote: I don't understand, why are these forward declarations so evil ? More code bloat, more typing and they get in the way. They dont give me anything useful in return. Garbage collection is largely no issue when using the Owner concept in TComponent, using TObjectList,

Re: [fpc-devel] type discussion

2005-06-02 Thread Micha Nelissen
On Thu, 02 Jun 2005 14:52:13 +0100 Jamie McCracken <[EMAIL PROTECTED]> wrote: > > C# is very much like delphi, not at all like Python. What were their > > reasons to switch ? > > Because its so close to Delphi and they have switched because they > found it more productive. No forward declaration

Re: [fpc-devel] type discussion

2005-06-02 Thread Jamie McCracken
Micha Nelissen wrote: On Thu, 02 Jun 2005 14:22:55 +0100 Jamie McCracken <[EMAIL PROTECTED]> wrote: In terms of _written_ or in terms of _working_ lines of code? :-> Dont kid yourself - a lot of my fellow Delphi programmers have dumped it for C# already so it is really worrying for me espci

Re: [fpc-devel] type discussion

2005-06-02 Thread Sebastian Kaliszewski
Vinzent Hoefler wrote: On Thursday 02 June 2005 13:04, Jamie McCracken wrote: However, in general Pascal has poor developer productivity when compared to modern languages like python and C#. In terms of _written_ or in terms of _working_ lines of code? :-> Both in fact as they are direct

Re: [fpc-devel] type discussion

2005-06-02 Thread Micha Nelissen
On Thu, 02 Jun 2005 14:22:55 +0100 Jamie McCracken <[EMAIL PROTECTED]> wrote: > > In terms of _written_ or in terms of _working_ lines of code? :-> > > Dont kid yourself - a lot of my fellow Delphi programmers have dumped it > for C# already so it is really worrying for me espcially with borland

Re: [fpc-devel] type discussion

2005-06-02 Thread Vinzent Hoefler
On Thursday 02 June 2005 13:22, Jamie McCracken wrote: > Vinzent Hoefler wrote: > > On Thursday 02 June 2005 13:04, Jamie McCracken wrote: > >>However, in general Pascal has poor developer productivity when > >>compared to modern languages like python and C#. > > > > In terms of _written_ or in ter

Re: [fpc-devel] type discussion

2005-06-02 Thread Jonas Maebe
On 2 jun 2005, at 15:22, Jamie McCracken wrote: Dont kid yourself - a lot of my fellow Delphi programmers have dumped it for C# already so it is really worrying for me espcially with borland being virtually bankrupt. Delphi as it is faces a bleak future so its looking increasingly like its ti

Re: [fpc-devel] type discussion

2005-06-02 Thread Jamie McCracken
Vinzent Hoefler wrote: On Thursday 02 June 2005 13:04, Jamie McCracken wrote: However, in general Pascal has poor developer productivity when compared to modern languages like python and C#. In terms of _written_ or in terms of _working_ lines of code? :-> Dont kid yourself - a lot of my

Re: [fpc-devel] type discussion

2005-06-02 Thread Vinzent Hoefler
On Thursday 02 June 2005 13:04, Jamie McCracken wrote: > However, in general Pascal has poor developer productivity when > compared to modern languages like python and C#. In terms of _written_ or in terms of _working_ lines of code? :-> Vinzent. -- public key: http://www.t-domaingrabbing.ch/