[fpc-pascal] private integer is an illegal counter variable
Flávio Etrusco
flavio.etrusco at gmail.com
Tue Dec 1 01:05:53 CET 2009
On Sat, Nov 28, 2009 at 7:12 AM, Jürgen Hestermann
<juergen.hestermann at gmx.de> wrote:
>> And there are many reasons why there are so many string types nowadays.
>
> True.
>
>> Simply use {mode objfpc}{$h+} like lazarus suggests.
>
> I think the root cause of all these problems are generic types. They cause
> more trouble than they avoid. I would suggest that noone never uses such
> generic types but uses shortstring or ansistring (or...) as they need.
> Telling people to simply use this or that compiler switch is not the
> solution (you have to explain this over and over again). Generic types
> should be the exception and not the norm. It begs for trouble in many
> situations. Using strict types also lets the user read more about the nature
> of these types and therefore knows more about possible side effects. Someone
> who has shortstings in mind when using strings would surely use it in a
> different way as someone who has ansistrings in mind (provided he knows how
> they are handled by the compiler). And telling people clearly about the
> implementation of these different types is much better than obscuring them
> by generic types.
>
Maybe FPC could have a directive to disable/undeclare the 'string'
type/keyword ;-)
-Flávio
More information about the fpc-pascal
mailing list