@PowerPC630:
Ther is alot of use for function overloding:)
maby you want more than one Create "construktor" with different parmameters, so what shod you call the other? makes alot more sence to use the same name, and let the compiler shose by the nummer of parmameters.
this happend in my latest particle projekt, was a problem with extended partikels from a main partikle, now, i cant have a construktor in the sub class named the same as the main construktor with different parmameters doing different stuff, so i have to create a new construktor in the sub class to do some different stuff in each. this was very big pain in the ass.
like:
type TBase
function Create:TBase()
end function
end type
type TSub extends TBase
function Create:TSub(TFoo bar) ?
end function
end type
now, the construktor Create() here, is from the TBase type, so if i want to do somting else in my construktor, o have to kall it somting else than Create() wen i create a sub objekt.
in my projekt, i had to call alla the construktors stuff like Create_missile() and so on, cus i codent overlod the Create() and i had to do different stuff in all the construktors....
of corse, i can use the base "construktor" named Create, but that may not be what i need....
and for the rest of the stuff here, i agrie with Mark, i have never liked Propertys, i dont like that "magical-somthing happens behind my back" fealing eather, and it seems very strange to me that one can set an variabel and that it also do a mystical function call(for example) in the back... wen i looked att some stuff in delphi using this, it was very hard to know exaktly what the hell was going on ther, one never knows if it is a variabel set, or somting else... so very confusing....
other than that, most of the stuff here is right, i dont mind the abstract stuff doh.
a whodent mind shange the name global to static, but i gues mark has alredy made up his mind, and we are not going to shange it eather.
but i do want to se som private/public stuff in types, i realy miss that, and i dont think it komplicates stuff if types fields are public by defult, if one dont like private, dont use it... i fail to se the problem here.
on the type overloding problem, i want an compiler error here, no magical solutions on convertions and so on.
well, thats it fokes =)
Ther is alot of use for function overloding:)
maby you want more than one Create "construktor" with different parmameters, so what shod you call the other? makes alot more sence to use the same name, and let the compiler shose by the nummer of parmameters.
this happend in my latest particle projekt, was a problem with extended partikels from a main partikle, now, i cant have a construktor in the sub class named the same as the main construktor with different parmameters doing different stuff, so i have to create a new construktor in the sub class to do some different stuff in each. this was very big pain in the ass.
like:
type TBase
function Create:TBase()
end function
end type
type TSub extends TBase
function Create:TSub(TFoo bar) ?
end function
end type
now, the construktor Create() here, is from the TBase type, so if i want to do somting else in my construktor, o have to kall it somting else than Create() wen i create a sub objekt.
in my projekt, i had to call alla the construktors stuff like Create_missile() and so on, cus i codent overlod the Create() and i had to do different stuff in all the construktors....
of corse, i can use the base "construktor" named Create, but that may not be what i need....
and for the rest of the stuff here, i agrie with Mark, i have never liked Propertys, i dont like that "magical-somthing happens behind my back" fealing eather, and it seems very strange to me that one can set an variabel and that it also do a mystical function call(for example) in the back... wen i looked att some stuff in delphi using this, it was very hard to know exaktly what the hell was going on ther, one never knows if it is a variabel set, or somting else... so very confusing....
other than that, most of the stuff here is right, i dont mind the abstract stuff doh.
a whodent mind shange the name global to static, but i gues mark has alredy made up his mind, and we are not going to shange it eather.
but i do want to se som private/public stuff in types, i realy miss that, and i dont think it komplicates stuff if types fields are public by defult, if one dont like private, dont use it... i fail to se the problem here.
on the type overloding problem, i want an compiler error here, no magical solutions on convertions and so on.
well, thats it fokes =)