Alexey Zinger wrote:
> There are quite a few optimizations with strings, for sure. Such as
> replacing concatenation using "+" operator with StringBuilder and
> concatenation of literals with a single literal (*).
>
> There's an interesting exception to that rule. The following will
> work as
hmm.. think you missed the point there peter. "two " + "three" ==
"two three" regardless of what comes before it. But I think i might
know why the optimizer picks up
"one " + "two " + "three"
but not
getOne() + "two " + "three"
it probably sees this..
(("one " + "two ") + "three")
==
(("one
I did miss the point (or in fact the little word "not").
I think your theory is probably right, although in the absence of
arbitrary operator overloading it seems quite clear what the type of
(getOne() + "two ") is and since string concatenation is associative it
would be a valid optimization.
Maybe I missed your point :) I thought the original question was why
getOne() + "two " + "three"
doesnt become
getOne() + "two three"
even if it was
getTotallyRandom() + "two three"
On Aug 27, 9:07 pm, Peter Becker wrote:
> I did miss the point (or in fact the little word "not").
>
> I thi
yes, i do like the "if you sue me over a patent you can take my code
and shove it" clause.
On Aug 27, 2:46 pm, Michael Neale wrote:
> Does BSD have the "be cool on the patents" clause to provide author
> protection etc? from what I remember, other then that they are very
> similar. But "BSD styl
You're going to get a bunch of errors if you attempt to edit lombok
code in a smart editor that doesn't have lombok support installed,
yes. It's unavoidable.
On Aug 27, 5:31 am, Mark Derricutt wrote:
> For javac maybe, but not for IDEA or Netbeans, or eclipse without the lombok
> plugin (thats m
I thought your comment to my post was quite appropriate -- I really had
misread Alexey's post.
But maybe we are just entangled in some weird kind of dance, missing
each others point until the end of time. Or something.
Bedtime.
Peter
Christian Catchpole wrote:
> Maybe I missed your point
yes that's.. i have a habit of posting.. re-reading.. and doh!-ing :)
On Aug 27, 10:40 pm, Peter Becker wrote:
> I thought your comment to my post was quite appropriate -- I really had
> misread Alexey's post.
>
> But maybe we are just entangled in some weird kind of dance, missing
> each others
I can confirm that the compiler is completely unaware of multi-arity
operators (the notion that + takes 2 OR MORE elements - it just takes
2 elements, no more, and multiple applications are merely this notion
chained), and that these are always resolved in a strict left-to-right
fashion.
You can
I thought I read something somewhere some licences are better suited for
libraries while others are better for end-user applications.
Anyway, what's the overall opinion about Apache 2 ?
On Thu, Aug 27, 2009 at 14:17, Christian Catchpole
wrote:
>
> yes, i do like the "if you sue me over a patent y
That's how all compilers I've seen do things. It's all just parser
rules and associativity that maps to unary or binary tree nodes which
then is collapsed in the desugar/optimizer phase. Nothing unusual
about that, classic divide and conquer I'd say.
/Casper
On 27 Aug., 14:45, Reinier Zwitserloo
Well, the normal GPL isn't suited to libraries because they would
require the entire app to become GPL. So they made the LGPL. But
people just moved to Apache and BSD.
I like Apache 2. But it's not just about what's a good license, you
have to consider how you might need to mix them.
On Aug 2
> If someone has a better idea I'd love to hear it.
I don't proclaim that, but I have a suggestion.
This seems to be such a similar idea to traits* that it may be worth making
the leap to them if you consider them to be more powerful. One thing with the
delegates idea is that they don't allow
So BSD would be considered more "mixable" then Apache2?
I did read about a license once that seriously excluded uses for meat
production/consumption industries - was basically a "vegan" license.
Wish I could find it again (it was for some JSF library).
Damn chrome making me spell 'merican
O
On Aug 28, 2:16 pm, Michael Neale wrote:
> So BSD would be considered more "mixable" then Apache2?
Actually, I have no idea. :) Just read you have to be careful.
Probably doesn't matter so much with the 'BSD style' as you say.
> I did read about a license once that seriously excluded uses for
15 matches
Mail list logo