> It seems very few people are using the modern (v3) collection
> referencing syntax:
> 
>    session{"foo"} := "bar"
>    $foo := session{"foo"}
> 
> instead of:
> 
>    set session("foo"; "bar")
>    $foo := get session("foo")
> 
> To me the first syntax is clearer and much more natural, as soon as  
> you think of a collection as an associative array that is being  
> indexed by a text key instead of a number like 4D arrays.

I discovered this syntax early in my first project and immediately switched to 
using it. In fact, I was using the demo to build on and it used the old style 
reference. I went back and changed all the code I borrowed from the demo to the 
new syntax. It's *much* clearer to read and much cleaner than the old syntax.

I've been (re)reading the A4D documentation and found that you can use the new 
syntax with a reference to a collection or an iterator. So you can do this:

$_header := request info
$hostname := $_header{"host"}

The old syntax can be deprecated as far as I'm concerned.

Warmest regards,

Rick Hazey
bitworx, inc.
---------------------------
[EMAIL PROTECTED]
http://www.bitworx.com
---------------------------
11924 Sunray Ave. Suite B
Baton Rouge, LA 70816
(225) 293-1333 Voice
(225) 293-1330 FAX
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to