[fpc-pascal] Set size limit
Mark Morgan Lloyd
markMLl.fpc-pascal at telemetry.co.uk
Mon Mar 11 10:39:55 CET 2013
Jonas Maebe wrote:
> On 10 Mar 2013, at 15:00, Juha Manninen wrote:
>
>> There are no 8-bit CPUs
>> supported by FPC that would justify it.
>
> It is unrelated to 8 bit cpus. Even Turbo Pascal 1.0 ran on a 16 bit cpu.
Provided that one calls a Z80 16-bit :-) More to the point: do any
current CPUs have e.g. vector operations that suggest a realistic
maximum size?
>> I am annoyed by some LCL bugs which are there only for Delphi compatibility.
>> This issue is similar.
>
> It is not.
>
>> This kind of artificial limitation could easily be fixed.
>> I think it should apply for {$mode objfpc} only.
>
> There is a already a test for larger set support: http://svn.freepascal.org/svn/fpc/trunk/tests/test/tset6.pp
>
> Nobody has worked yet on implementing it, but if anyone thinks it's easy to do, please go ahead. For larger sets, especially if they are sparse, a simple hashtable-based class would probably be much faster and memory efficient than simply extending the default implementation though. With operator overloading and generics you might even be able to use more or less the same syntax as with built-in sets.
For larger sets... OK, how /does/ one declare a set of UTF-8 characters?
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-pascal
mailing list