Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > multi-line Strings

Thread Tools

multi-line Strings

Stefan Ram
Posts: n/a
BGB <(E-Mail Removed)> writes:
>I have sometimes gone the other way though, finding a dedicated textual
>representation to be more compact and easier to work with than an API,
>but either way.

See »The March of Progress« on

Reply With Quote
Posts: n/a
On 12/21/2012 1:03 PM, Stefan Ram wrote:
> BGB <(E-Mail Removed)> writes:
>> I have sometimes gone the other way though, finding a dedicated textual
>> representation to be more compact and easier to work with than an API,
>> but either way.

> See »The March of Progress« on
> .

yeah, in my scripting language:
printf("%10.2f", x);

also typically, math functions can be used directly, like in:
z=atan2(y, x)/TAU; //(TAU=2*PI)
or: ...

actually, as-is, these math functions are actually intrinsics, and
treated similar to operators by the VM (mostly for sake of higher
performance, as function-calls are more expensive, and these functions
may often appear in tight loops).

this also includes a few "uncommon" / "non-standard" math functions,
like "ssqrt" (signed square root), "spow" (signed power), mostly as
these are sometimes rather useful.

a cost though is that it isn't currently possible to override them,
though theoretically a person could write something like:
or: ...

partly, as these don't invoke the intrinsic (which is specific to the
direct-function-call usage). (there are a few method-like intrinsics
though, mostly ".clone()" and ".toString()" and similar, so it isn't
really free-and-clear either).

(this issue may be resolved eventually, mostly as it would involve
nailing down some issues regarding scope, as currently scope isn't fully
nailed down before producing the bytecode, whereas these intrinsics are
handled in the front-end compiler).

actually, similarly, many things, like vector-math, are built in (note:
these types are value-types).

(using the "non-canonical" declaration syntax):
vec3d a, b, c; //vec3(double)
c=a%b; //cross product, c=#[0,0,1]
double f; //canonical: "var f:double;"
f=a*b; //dot product

vector types: vec2/vec3/vec4/quat (float), vec2d/vec3d/vec4d/quatd
(double), where quat = quaternion.

well, there is also complex/fcomplex/dcomplex, which I guess also count
as vectors (complex=dcomplex, or "double complex").


granted, yes, a lot of this is a little closer to the core usage-domain
of the language (namely, stuff useful in 3D gaming).

or such...

Reply With Quote
Sven Köhler
Posts: n/a
Am 15.12.2012 22:33, schrieb Lew:
> On Monday, December 10, 2012 8:22:52 AM UTC-8, bob smith wrote:
>> Right now, I have a mess like this:
>> private final String mLomoishShader =

> That constant variable should be named in all uppercase letters with
> underscores, per the Java coding conventions.

.... and should be made static.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strings, Strings and Damned Strings Ben C Programming 14 06-24-2006 05:09 AM
How to generate k+1 length strings from a list of k length strings? Girish Sahani Python 17 06-09-2006 11:01 AM
Catching std::strings and c-style strings at once Kurt Krueckeberg C++ 2 11-17-2004 03:53 AM
convert list of strings to set of regexes; convert list of strings to trie Klaus Neuner Python 7 07-26-2004 07:25 AM
Comparing strings from within strings Rick C Programming 3 10-21-2003 09:10 AM