[fpc-pascal] Re: TLinkedList
ik
idokan at gmail.com
Wed Feb 15 10:25:23 CET 2012
On Wed, Feb 15, 2012 at 11:19, Juha Manninen <juha.manninen62 at gmail.com> wrote:
> 2012/2/15, Jorge Aldo G. de F. Junior <jagfj80 at gmail.com>:
>> i once read a textbook about generics (C++ generics) showing how C++
>
> C++ does not have generics, it has templates. Templates syntax is
> complex, you can do actual programming with it. IMO, using all its
> capacity leads to over-engineered and unreadable code.
> I read about a plan to add Java style generics syntax to C++, in
> addition to templates. I guess it will not happen. C++ has enough
> syntax already.
You really do not understand the state of mind of C++ :)
C++ is like a big pot on a camp fire.
They just throw everything inside, and hope you choose only the food
you like to eat, but usually ends up eating fast food instead (Qt,
Boost etc...)
>
>
>> code can end up being FASTER than C equivalent due to lack of type
>> checks...
>>[...]
>> the point being made was that object orientation is not necessarely
>> "bloat" but leads to better written code. (not always true, but...)
>
> Code can still be fast even if it is bloated in size. Object
> orientation helps in writing readable and maintainable code but that
> is yet another issue.
> The code duplication we discussed here has no advantage for speed. It
> is quite useless duplication.
>
>
> >From Sven Barth:
>> Free Pascal is a native language. There aren't much alternatives to code duplication.
>
> Yes there is. The same container code can be reused (when possible),
> just like Java does.
> Free Pascal is native, Java generates byte-code, but that is irrelevant here.
>
> I was planning to use generics in many places in Lazarus code but now
> I must rethink...
> Lazarus executable is quite big already.
>
> Juha
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
More information about the fpc-pascal
mailing list