> With all due respect you missed my point. Or maybe I didn't
> make it clear. It wasnt to get rid of JS, but rather for it
> to written as easily as CF. CF makes sense.
>
> <cfif getquery.theID EQ "blablah">
> do this
> </cfif>
>
> The same thing in JS goes somethin like this.
>
> for (i=0;i<g.length;i++)
> total+=parseInt(g[i][1])
>
> output='<table border="0" cellspacing="0" cellpadding="0">'
> for (i=0;i<g.length;i++){
> calpercentage=Math.round(g[i][1]*100/total)
> calwidth=Math.round(gwidth*(calpercentage/100))
> output+='<tr><td>'+g[i][0]+'&nbsp;</td><td><img
> src="'+graphimage+'" width="'+calwidth+'" height="10">
> '+calpercentage+'%</td></tr>'
> }
> output+='</table>'
> document.write(output+'<br>Total participants: <b>'+total+'</b>')
Well, actually, the same thing in JS would be something like this:
if (getquery.theID == 'blahblah') {
do this;
}
> Ok, so I exaggerated, but who's the numb skull that came up
> with ++ and &&?? And ==?
Those operators predate the existence of CF, actually.
> My point is it'd just make life easier if the same creative
> minds that engineered CF to be written much like english also
> engineered the others.
CFML isn't written especially like English, it's written like HTML. CFML is
designed to do one thing, and that's generate HTML. So, the creative minds
that came up with CFML explicitly modeled it after HTML. Many programming
languages, such as JavaScript, are not designed to do just one thing, and
programs written in these languages might be able to run in many different
environments. For example, JavaScript programs can run in an HTML page
within a browser, or as Windows Script Host files from a Windows command
line, or within a classic ASP page to generate HTML. So, the creative minds
that came up with JavaScript weren't so concerned with fitting it within one
niche.
I suspect that most programmers would rather shoot themselves than use a
tag-based language for things outside the niche of generating tag-based
markup like HTML, XML and so on. Most programmers learn programming with
languages that are more similar to JavaScript than CFML, too, and in many
respects those languages often give the programmer much more control over
how the program can work.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200144
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54