Do not built things into the compiler (or ask for them) that can be done outside of it. Building in things is many times as much work. Maybe I haven't stressed this enough so far because it's so obvious to me, but not to those who haven't worked in the compiler.
I understand, but the balance changes when 10 people, or 100 or 1000 people need to do the same thing. Which is more work, a compiler writer making a hard change, or 100 people each writing a set of relatively straightforward code? That's why we try to identify features that will be widely used, such as vector arithmetic.
FPC already supports assignments of vectors and arrays, so why not addition and subtraction? It builds on a capability that the compiler already has.
Frank Rubin
On Tue, Aug 10, 2010 at 7:21 AM, Contestcen@aol.com wrote:
FPC already supports assignments of vectors and arrays, so why not addition and subtraction? It builds on a capability that the compiler already has.
I don't know if there is already an unit in FPC which adds operator overloading to the most common data types. If there isn't you could just submit a patch with one, as the implementation is trivial to do (without threading at least).
I would recommend that any follow ups to this discussion be sent to the free pascal mailling list.
Contestcen@aol.com wrote:
Do not built things into the compiler (or ask for them) that can be done outside of it. Building in things is many times as much work. Maybe I haven't stressed this enough so far because it's so obvious to me, but not to those who haven't worked in the compiler.
I understand, but the balance changes when 10 people, or 100 or 1000 people need to do the same thing.
No, it doesn't.
Which is more work, a compiler writer making a hard change, or 100 people each writing a set of relatively straightforward code?
You know that libraries/units/modules can be shared? So it's more that publishing of generally useful libraries should be more encouraged.
(And if you're worried that 100 people would each prefer a different interface -- that's even more of a problem when built into the compiler, in which case the one built-in interface is compulsory for anyone who wants to use the features.)
Frank