[thesite] CF error on home page

jeff jeff at members.evolt.org
Thu Dec 21 20:15:49 CST 2000


: From: Oliver Lineham
: show me another major language that allows an
: operator (such as '.') to exist within a variable name.
: most serious languages don't allow it, for good reason.

now you're just trolling.  you know that the issue isn't that it allows
periods within variable names.  the issue is that it requires you to type
your variables - just like everything else where the period is an operator.

: i assumed this language would be consistent, which it isn't.

you're absolutely wrong.  it is consistent.  if you don't type your
variables they're going to be strings - simple as that.  the fact that it
doesn't error out when you use a period in the variable name is completely

: in a normal language, you either always have to define
: variable before using them, or never have to.  in CF it
: can be either.  you can create a new primitive variable
: in a <cfset> on the fly without definition.  but you have
: to define a struct.

and you're point?  you can do the very same thing in javascript, for
example.  however, if you want the variable to be anything more than a
string then you have to type it (ie, new Array(), new Object, etc.).

i think you're missing the point completely about cold fusion though.  it
wasn't designed to be the uber-geeks language of development languages.  it
was designed to be a language that was flexible and easy to understand for
relative beginners while offering the experienced programmer the ability to
perform complex operations, both in a relatively short amount of time.  in
order to accomplish this you're going to get trade-offs like variables being
strings (as opposed to needing to be typed as int, long int, char, etc.),
sloppy things like allowing periods within variable names, etc.  instead of
harping on cf for these things, why not recognize that they're just things
you have to keep in mind when using it, just like you have to do for any
other language you use.

: consider if allaire had not allowed the '.' in a variable name,
: and reserved it as an operator only.  there would be no
: need to initialise a struct on first use, since
:          <cfset somenewstruct.somevar = "something">
: would be unambiguous.

what's so difficult about the logic that says if your variable contains
anything other than a simple value then you must type it?  i think that your
example above is even more ambiguous because there's no indication anywhere
what type of variable it is.  it could be a query.columnname reference or a
struct.structkey reference.  how would i know unless it was typed from the

: yes, the language is primitive.  (it is also ugly, but that's a
: different issue)

geeeze ol, another troll.  i thought you were alittle smarter than that.  if
personally find languages like asp and php to be clunky and headache
inducing.  perl is another language that's just plain ugly.  however, you
don't hear me spouting off repeatedly about how bad they are.

if you find it that painful to work with then don't use it.  go build your
apps in php, asp, perl, or something else that follows all the little rules
you think it should follow and let the rest of us who enjoy developing
applications with cold fusion do so in peace.

i've developed hundreds of applications with cold fusion and written
hundreds of thousands of lines of code.  i've been able to do it with
relative ease.  i've taken the time to learn the strengths and weaknesses of
the architecture, the pitfalls in the language, and the shortcuts for
various operations.  i have no difficulty with the language because of this.
maybe instead of spending so much time complaining about it you could do the

: this is a classic trade-off between creating a language
: that is easy for a non-programmer to understand, and
: one that is well structured and consistent.

why didn't you think of this earlier in your response?  you may have a point
with well structured, but i think you're off when it comes to the claims of

: i have found errors and ambiguities in the CF documentation,
: yes, but i have no problem with CFLOCK documentation.  the
: docs for CFLOCK are clear enough. perhaps they could've
: written in baby terms for the designers who are trying to
: write CF applications, but then the page would likely have
: been ambiguous to the programmers.

when i mentioned that questions are coming up about cflock on a regular
basis on other lists, i wasn't referring to the casual designer using cold
fusion.  these people that are asking about it and how to use it are
programmers.  something is amiss if they're needing help consistently.



mailto:jeff at members.evolt.org

More information about the thesite mailing list