>>1) all typed variables could be referenced w or w/o the "typed" scope
>>2) in a block of strongly-typed code the "typed" scope would implied
>>(roughly analogous to Java's import statement)
>>3) Then The CF parser/compiler would have a set of readily-identifiable
>>strongly-typed variables, that it could resolve efficiently.

How about just use declarations like in C:
int myInteger;
char myString = "abcdef";

Then in all the rest of the template,
- declared variables are strongly typed and cannot be converted to another type unless through an appropriate function.
- undeclared variables will behave exactly as presently.
Plus an option in Application.cfm that could enforce stroug typing. In this mode, any use of an undeclared variable would be considered as illegal and trigger an error.

This is about the way Clipper has implemented local and compiled variables as an extra feature in version 5, compared to fully dynamic variables before.

This way, one could create 100% strongly typed program, or ignore the new feature and work exactly like before.
--
_______________________________________
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to