Re: CFScript - what's the advantage?

2009-10-05 Thread s. isaac dealey

 Isn't a
 
 cfloop from=x to =y index=i step=z
 
 a counter loop?

Yes, it is. The difference is that the implementation is slightly less
flexible than the script version, but only slightly so, and only
noticeably so in edge cases that most of us will never see or touch or
even hear about. 

x = blah; 
... some other stuff ...
for (; x mod 7 neq 3; x *= sqrt(pi)) {

} 

You wouldn't be able to increment x by multiplying it by the square root
of pi for example, you can only increment it by adding a signed integer
value. And similarly the to attribute is a number, rather than a
formula the way it is in a script loop, so you wouldn't be able to do 
x mod 7 neq 3 as the formula for completion either, because the tag loop
is limited to checking  or  x number. But because most of us will
never see or touch or even hear about these kinds of cases where that
sort of thing is actually useful, the tag-loop is synonymous in well over
99% of cases. I don't know that this particular pseudocode would
actually run or work - probably not - or it would create an infinite
loop maybe - but it's really just meant to be an example. ;) 

-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
 ph: 817.385.0301

http://onTap.riaforge.org/blog



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326887
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFScript - what's the advantage?

2009-10-05 Thread Dominic Watson

One of the reasons that Adobe have quoted is to ease migration from other
languages. Attracting more developers being the goal.

Personally, my eyes prefer cfscript stylee unless I'm outputting html / xml.

Dominic

2009/10/5 Mike Kear afpwebwo...@gmail.com


 I've been trying to see what's the benefit of enhancing CFScript.
 There are a couple of reasons I can think of,  but am I missing
 something?  Are there more significant reasons for enhancing CFScript
 than I have here? Like for example performance issues?

 [A]  I like to code using a javascript-like syntax  i.e  personal
 preference
 [B]  if we are going to have a script-style syntax at all, it ought to
 be fully featured with all functions available so developers dont have
 to switch back and forth.
 [C] there are 'snobs' who think that tag-based coding isn't real
 coding and having a script language satisfies their need for a real
 programming language.

 Is there another reason to code in the CFScript rather than tags??


 --
 Cheers
 Mike Kear
 Windsor, NSW, Australia
 Adobe Certified Advanced ColdFusion Developer
 AFP Webworks
 http://afpwebworks.com
 ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326891
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFScript - what's the advantage?

2009-10-05 Thread Tony Bentley

Faster to read and type when working with blocks of code.

cfset var = ''

vs

var = '';

The other thing I like is that it enforces more of a MVC approach. Less 
variable declaration nested inside of your output tags and you'll find yourself 
writing logic outside of the HTML output. 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326907
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFScript - what's the advantage?

2009-10-05 Thread Rick Root

I would generally agree that cfscript is prettier and easier to
read and we should be able to do everything in cfscript.  I would
more likely use it for component development where output is not
typical, and the ability to build whole cfcs in cfscript is cool.

Rick

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326927
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


CFScript - what's the advantage?

2009-10-04 Thread Mike Kear

I've been trying to see what's the benefit of enhancing CFScript.
There are a couple of reasons I can think of,  but am I missing
something?  Are there more significant reasons for enhancing CFScript
than I have here? Like for example performance issues?

[A]  I like to code using a javascript-like syntax  i.e  personal preference
[B]  if we are going to have a script-style syntax at all, it ought to
be fully featured with all functions available so developers dont have
to switch back and forth.
[C] there are 'snobs' who think that tag-based coding isn't real
coding and having a script language satisfies their need for a real
programming language.

Is there another reason to code in the CFScript rather than tags??


-- 
Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326884
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFScript - what's the advantage?

2009-10-04 Thread Barney Boisvert

You can't express a true counter (for) loop with CFLOOP, only a  
condition loop (while).  So that's one reason.  Probably the reason I  
use it most often, even over reducing verbosity.

Beyond verbosity and a couple edge cases, I think it's pretty much  
entirely personal preference.

cheers,
barneyb

--
Barney Boisvert
bboisv...@gmail.com
http://www.barneyb.com/

On Oct 4, 2009, at 10:05 PM, Mike Kear afpwebwo...@gmail.com wrote:


 I've been trying to see what's the benefit of enhancing CFScript.
 There are a couple of reasons I can think of,  but am I missing
 something?  Are there more significant reasons for enhancing CFScript
 than I have here? Like for example performance issues?

 [A]  I like to code using a javascript-like syntax  i.e  personal  
 preference
 [B]  if we are going to have a script-style syntax at all, it ought to
 be fully featured with all functions available so developers dont have
 to switch back and forth.
 [C] there are 'snobs' who think that tag-based coding isn't real
 coding and having a script language satisfies their need for a real
 programming language.

 Is there another reason to code in the CFScript rather than tags??


 -- 
 Cheers
 Mike Kear
 Windsor, NSW, Australia
 Adobe Certified Advanced ColdFusion Developer
 AFP Webworks
 http://afpwebworks.com
 ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326885
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFScript - what's the advantage?

2009-10-04 Thread James Holmes

Isn't a

cfloop from=x to =y index=i step=z

a counter loop?

mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/



2009/10/5 Barney Boisvert bboisv...@gmail.com:

 You can't express a true counter (for) loop with CFLOOP, only a
 condition loop (while).  So that's one reason.  Probably the reason I
 use it most often, even over reducing verbosity.

 Beyond verbosity and a couple edge cases, I think it's pretty much
 entirely personal preference.

 cheers,
 barneyb

 --
 Barney Boisvert
 bboisv...@gmail.com
 http://www.barneyb.com/

 On Oct 4, 2009, at 10:05 PM, Mike Kear afpwebwo...@gmail.com wrote:


 I've been trying to see what's the benefit of enhancing CFScript.
 There are a couple of reasons I can think of,  but am I missing
 something?  Are there more significant reasons for enhancing CFScript
 than I have here?     Like for example performance issues?

 [A]  I like to code using a javascript-like syntax  i.e  personal
 preference
 [B]  if we are going to have a script-style syntax at all, it ought to
 be fully featured with all functions available so developers dont have
 to switch back and forth.
 [C] there are 'snobs' who think that tag-based coding isn't real
 coding and having a script language satisfies their need for a real
 programming language.

 Is there another reason to code in the CFScript rather than tags??


 --
 Cheers
 Mike Kear
 Windsor, NSW, Australia
 Adobe Certified Advanced ColdFusion Developer
 AFP Webworks
 http://afpwebworks.com
 ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month



 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326886
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4