> benefit from in
> all of this strong typing discussion is the ability to
> cast a variable to
> any java class. I feel that if I could JavaCast() to any
> java class in order
> to create byte arrays or other specific types I would have
> everything I need
> in terms of typing.
> In addition, I have heard it mentioned that strong typing
> would make us
> write better code, but I personally enjoy the flexibility
> coldfusion
> provides though I generally create a variable and treat it
> as if it were
> strongly typed, avoiding conversions to other types. This
> is not only for
> efficiency, but for better understanding of my code
> without needing strong
> typing. I think much of these arguments could be solved
> with the simple
> study of basic computer science topics.
> Essentially, I have to wonder if the time spent creating
> this feature vs.
> the JavaCast() idea or others would be a good decision
> when it is fairly
> easily replaced by good practices and tools already
> available in CF.
> Thanks and Hope that made sense (It's 3:30 am),
> Mike
My work is similar ... and I have similar feelings about the
strong-typing issue. I don't feel it's a crucial issue and likely the
yield is not worth the time to implement it. (I say this, knowing that
issues I feel have been critical have not been addressed because
others have felt the same way about them. Them's the breaks I
suppose.) Personally I think the lack of nulls in CF is far more
troublesome than the lack of strong-typing and if I had to prioritize
them, nulls would be way up near the top of my list, while stong
typing would be way down toward the bottom. Others aren't bothered by
the lack of nulls in CF and have the opinion of them that I have of
strong typing. I don't know if this has anything to do with their not
being implemented - they may still not have been included largely due
to the technical challenges involved in adding them so late.
Imo the best workaround I've found for them is still a kludge - I
create a structure and treat values not found in the structure as null
values. Typically this structure is passed as the attribute collection
to a custom tag or as an argument to a function which then contains a
switch to determine whether those nulls should be ignored or forwarded
on to the database. It works but even still it's not as precise as I'd
like.
The only other workarounds I've seen have been to use the word 'null',
empty strings or worse in place of null values, often using the word
'null' as the name of a variable, which beyond being ugly is courting
disaster, i.e. <cfset null = 'null'>. I suppose if I were going to use
a simple value to represent nulls, I'd have to opt for a non-printing
character that's not used for much of anything else, like the ascii
beep code. (chr(7) iirc). In any event, that's what I'm not happy
with. :)
s. isaac dealey 954.927.5117
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

