Velocity
  1. Velocity
  2. VELOCITY-531

Some user feedback / wishes from the O'Reilly blog

    Details

    • Type: Wish Wish
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.6
    • Component/s: None
    • Labels:
      None

      Issue Links

        Activity

        Henning Schmiedehausen created issue -
        Hide
        Christopher Schultz added a comment -

        Other than break and continue support for loops, I believe that all of this has been implemented, in spite of the author's complaints about r1.5.

        I'm not entirely sure about NULL support in #if clauses... I haven't yet upgraded. Does null really not compare correctly to NULL?

        Comparisons work as expected, now (for instance, int and long); the author says so in his post. Not sure why he included this in his with list.

        String-to-number casting is sort of done.... numbers are converted to strings. My understanding is that if the types are not the same, they are both converted to String and compared. I believe this creates the desired effect.

        Show
        Christopher Schultz added a comment - Other than break and continue support for loops, I believe that all of this has been implemented, in spite of the author's complaints about r1.5. I'm not entirely sure about NULL support in #if clauses... I haven't yet upgraded. Does null really not compare correctly to NULL? Comparisons work as expected, now (for instance, int and long); the author says so in his post. Not sure why he included this in his with list. String-to-number casting is sort of done.... numbers are converted to strings. My understanding is that if the types are not the same, they are both converted to String and compared. I believe this creates the desired effect.
        Hide
        Will Glass-Husain added a comment -

        I like the #break idea myself.

        String to number casting really doesn't work. An integer is converted as "1" and a double as "1.0" - that would fail the string compatibility test. And none of the arithmetic or other logical operators work.

        Show
        Will Glass-Husain added a comment - I like the #break idea myself. String to number casting really doesn't work. An integer is converted as "1" and a double as "1.0" - that would fail the string compatibility test. And none of the arithmetic or other logical operators work.
        Hide
        Nathan Bubna added a comment -

        Ok, i just changed ==, != and !$foo to work more naturally. I think that should suffice for the author's complaints about null handling. all that remains is #break and string to number casting. i agree that string to number casting could have some gotchas, but i could see it working. i'm not sure either of those will happen for 1.6 though. with all the performance improvements and bug fixes, i'm rather eager to get 1.6 out there and not wait on these two remaining features.

        Show
        Nathan Bubna added a comment - Ok, i just changed ==, != and !$foo to work more naturally. I think that should suffice for the author's complaints about null handling. all that remains is #break and string to number casting. i agree that string to number casting could have some gotchas, but i could see it working. i'm not sure either of those will happen for 1.6 though. with all the performance improvements and bug fixes, i'm rather eager to get 1.6 out there and not wait on these two remaining features.
        Nathan Bubna made changes -
        Field Original Value New Value
        Link This issue depends on VELOCITY-612 [ VELOCITY-612 ]
        Hide
        Nathan Bubna added a comment -

        Jarkko's provided a clean, simple patch for #break support

        Show
        Nathan Bubna added a comment - Jarkko's provided a clean, simple patch for #break support
        Hide
        Nathan Bubna added a comment -

        I think this wishlist is as done as it is going to be for the foreseeable future. Further string to number casting seems unlikely to happen without more lobbying.

        Show
        Nathan Bubna added a comment - I think this wishlist is as done as it is going to be for the foreseeable future. Further string to number casting seems unlikely to happen without more lobbying.
        Nathan Bubna made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Adrian Tarau added a comment -

        I personally don't like the idea of automatic casting from string to number.It doesn't bring any value and it could cause some strange and subtle problems.

        Show
        Adrian Tarau added a comment - I personally don't like the idea of automatic casting from string to number.It doesn't bring any value and it could cause some strange and subtle problems.
        Hide
        Will Glass-Husain added a comment -

        The idea appealed to me earlier, but... one problem is that it might makes sense for > and < operators, but not for ==. And if it's inconsistent, it's bad. It's confusing any way you do it-- I'm now against it.

        Show
        Will Glass-Husain added a comment - The idea appealed to me earlier, but... one problem is that it might makes sense for > and < operators, but not for ==. And if it's inconsistent, it's bad. It's confusing any way you do it-- I'm now against it.
        Mark Thomas made changes -
        Workflow jira [ 12400258 ] Default workflow, editable Closed status [ 12551480 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551480 ] jira [ 12552151 ]
        Gavin made changes -
        Link This issue depends on VELOCITY-612 [ VELOCITY-612 ]
        Gavin made changes -
        Link This issue depends upon VELOCITY-612 [ VELOCITY-612 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Henning Schmiedehausen
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development