News for hackers. Stuff that matters.
Re:Free Pascal by memsom on Sunday December 13, 2020 @09:45AM (#25406872)
No, sets. Sets are amazing. I still miss them to this day. Pascal also had sub ranges long before C# and the type system was very good. Delphi dereferenced its object model be default, so you could use dots rather than the awkward ^. Of pascal (-> in c++ and C)
Re:Free Pascal by JoeAltmaier on Sunday December 13, 2020 @09:46AM (#25406880)
Implementations sucked. They were bit vectors, limited to one machine word in length. So they were 16, 32 or 64 limited depending on where your program ran.
Re:Free Pascal by ac42 on Sunday December 13, 2020 @10:15AM (#25407080)
I'm pretty sure sets supported up to 256 elements (32 bytes) in Turbo Pascal on 16 bit systems, because you could manage ASCII characters with them. Yes, didn't scale. Yes, tons of use cases nonetheless.
Re:Free Pascal by benibela on Sunday December 13, 2020 @01:07PM (#25408594)
That is always so in Pascal

It has the best possible ideas, and then fuck up the implementation.

Recently, I tried to use a set on a three valued enum. With three values it should have worked perfectly. But no, the set was not allowed. Because the values were -1, 0, 1 and FPC apparently only can create set on non-negative integers