Why “new�

  • Thread starter Lawrence D'Oliveiro
  • Start date
A

Arne Vajhøj

Yeah...and neither is C++.

It is shorter than Java (a little bit in syntax a lot in style).

But I am sure there are languages shorter than C++.

Arne
 
A

Arved Sandstrom

On Sat, 05 Feb 2011 11:10:07 -0400, Arved Sandstrom wrote:
[ SNIP ]
That code snippet inherits Java's bounds checking, since it's Clojure
code. :) So it won't crash anything. Of course if the matrices are
incompatible for multiplication it will screw up. Actually, it will
truncate one or both matrices along some dimension, and multiply a
maximal multiply-compatible pair of submatrices.
[ SNIP ]
So the question is, what did you mean by bounds checking? If you meant
"make sure not to walk off the end of an array and crash" then they won't
crash. If you meant "make sure the 'matrix' isn't actually ragged-right,
and that matrices are compatible for multiplication" then they won't
throw exceptions on those conditions, and instead will return probably-
garbage results.
The latter was what I meant. I don't consider a matrix multiplication
language comparison example to be complete unless it demonstrates that
kind of checking. I'm not anal about it - a bit of handwaving that says
that a matrix type ("class" or similar) exists that takes care of some
of the checking at construction time is cool. But you'd certainly want
to show the compatibility check.

AHS
 
A

Arved Sandstrom

APL, in an ugly way.

J has arguably helped with that. Some. Fact is, if you apply yourself to
learning and using J then it's not line-noise at all, it's just
extremely terse. It's not symbol cruft in the same sense that Perl is.

AHS
 
R

Roedy Green

I’m surprised Java never added a shorter form,

Java has almost no syntactic sugar other that for:each which came
quite late in the game. The creators of Java were system programmers.
That sort of code is dense. Had they been application programmers who
have to write reams and reams of repetitive code, I suspect Java would
have been quite a bit terser.

Perhaps such things can be built on top of Java, for example "style
sheets" similar to CSS to let you write and maintain GUI code.
--
Roedy Green Canadian Mind Products
http://mindprod.com
To err is human, but to really foul things up requires a computer.
~ Farmer's Almanac
It is breathtaking how a misplaced comma in a computer program can
shred megabytes of data in seconds.
 
A

Arne Vajhøj

Java has almost no syntactic sugar other that for:each which came
quite late in the game. The creators of Java were system programmers.

Besides Java Gosling is most known for his Emacs.

Emacs is an app to me.

Facts does not seem to seem to fit with your hypothesis.

Arne
 
A

Arne Vajhøj

[...]
J has arguably helped with that. Some. Fact is, if you apply yourself
to learning and using J then it's not line-noise at all, it's just
extremely terse. It's not symbol cruft in the same sense that Perl is.

And what, pray tell, is J?

http://www.lmgtfy.com/

That is needlessly snarky. It's not as if one can google a one-letter
query and expect a useful result.

Since Peter suggested a 22 character query, then that is
not so relevant.

Arne
 
A

Arne Vajhøj

On Mon, 07 Feb 2011 11:27:56 +0800, Peter Duniho wrote:

On 2/7/11 11:17 AM, Ken Wesson wrote:
[...]
J has arguably helped with that. Some. Fact is, if you apply
yourself to learning and using J then it's not line-noise at all,
it's just extremely terse. It's not symbol cruft in the same sense
that Perl is.

And what, pray tell, is J?

http://www.lmgtfy.com/

That is needlessly snarky. It's not as if one can google a one-letter
query and expect a useful result.

The trick is to add some terms to give the single letter some context.
From the quoted comments, J had to be a programming language

I decided that J had to be some kind of tool, mathematical notation, or
something the learning of which made APL code more understandable as a
side-effect; but from the context it was not clear to me whether it was a
programming language itself, an APL IDE, a species of mathematical
theory, or any of a number of other things.

You could have tried all the 3 you list.

Arne
 
A

Arne Vajhøj

See my response to Patricia. You added "programming language" to the
query but the first post mentioning J did not make it clear that it was a
programming language, only that learning it would make APL code seem less
like line noise. Whether that meant it was an APL derivative, an APL IDE,
a mathematical system using similar symbols, or some other tool was not
made clear by that post.
This makes it sound like J might be an APL derivative or relative, but is
more likely an APL ecosystem tool created significantly later in time
than APL itself. If that impression was misleading, well, Arved Sandstrom
is the one who wrote it.

It could have been other things than a programming language,
but a programming language should be one of the first
guesses.
I suggest all of those with that trait try to be a bit more circumspect
with such opinions. Oftentimes what you thought was obvious wasn't. Tone
of voice doesn't survive the transition to email and newsposts, so
sometimes connotative content gets lost.

But I don't think much was lost in "J" and "APL".
You were thinking it when you
posted it, and then you assume it's obvious to anyone reading it, but
it's not. Or in the case at hand, you assume J will be vaguely familiar
to someone else as being a programming language, when they may never have
heard of it,

I am pretty sure that Peter had never heard of it either.

But has learned to use Google and Wikipedia.
Not everything you were thinking when you wrote something actually makes
it into the text. Not everything you know about some of the things you
mention are known to every reader. Not every reader will take away
exactly the same meaning you intended when you wrote it or took away when
you read it. Not every reader who doesn't read it the same way you
expected them to is an idiot, or a clueless newbie that knows nothing
about programming. And, for that matter, not every reader who *is* a
clueless newbie or an idiot requires being publicly called out as such
anytime the thought happens to cross your mind that maybe they are such.
Certainly, the atmosphere in this newsgroup would be nicer and you'd have
fewer flamewars if you kept such thoughts to yourself; voicing them is
pretty much never constructive. Indeed, really there's four categories of
people you might be tempted to flame in such a manner and flaming
actually helps with none of them:

1. People who just misunderstood something, or not even that; they
interpreted an ambiguous phrase differently from what you expected, or
didn't know something you assumed everybody (or every programmer) knew,
or simply disagreed with you on some point where you're absolutely
convinced you're right, or even that the rightness of your position is
obvious.

Flaming in this instance creates needless friction when what's needed
is clearer communication instead.

2. People who actually are clueless newbies, but are trying to learn.

Alienating them serves no useful purpose and they won't feel inclined
to receive any free clues from you if every one of them comes coated in
vinegar. They're liable to go elsewhere, such as C++ or Lisp, after
getting the impression that "Java programmers are a bunch of stuck-up
assholes". Some may even give up on programming altogether after
getting a negative first impression of programmer culture.

http://catb.org/~esr/faqs/smart-questions.html#keepcool

Arne
 
A

Arne Vajhøj

Private methods can still be virtual—see pages 189-190 of the C++ spec for
an example. And I can’t see any prohibition in section 10.3 (“Virtual
functionsâ€) against them being static.

Like I said, in Java, effectively all methods are virtual.

No.

And I can't understand why you think the C++ spec applies
to Java.

Especially since the Java spec explicit says otherwise.

Arne
 
L

Lew

You could have tried all the 3 you list.

That would have required reason and effort, and obviated the excuse to troll.

--
Lew
Ceci n'est pas une fenêtre.
..___________.
|###] | [###|
|##/ | *\##|
|#/ * | \#|
|#----|----#|
|| | * ||
|o * | o|
|_____|_____|
|===========|
 
L

Lew

Yet what it does have is so sweet! Maybe it doesn't need more sugar.
Besides Java Gosling is most known for his Emacs.

Emacs is an app to me.

Facts does not seem to seem to fit with your hypothesis.

Nonsense. emacs is an operating system.

:)

Yes, that means I told a joke (for those sourpusses out there who cannot infer
humor).

--
Lew
Ceci n'est pas une fenêtre.
..___________.
|###] | [###|
|##/ | *\##|
|#/ * | \#|
|#----|----#|
|| | * ||
|o * | o|
|_____|_____|
|===========|
 
M

Mike Schilling

Lew said:
Yet what it does have is so sweet! Maybe it doesn't need more sugar.

A fair amount of what was added in Java 5 (generics aside) was syntactic
sugar:

* Variable-parameter functions
* Autoboxing
* The enhanced for loop

The last of these is one of my favorite things in the whole language.
 
L

Lew

Peter said:
Really? Incredible!

Google says it resolves a search in around 2/10ths of a second for me. Even
accounting for network latency, I can get a search done in about 1 second.
Even accounting for the time it takes to type (let's assume you're awful at
typing and can manage only 5 words a minute or so, thus making the typing time
by far the dominant time-consumer in the activity), you ought to be able to
complete a half-dozen three-word queries in a few minutes.

Is that really so much harder than spending all this time complaining that I
was "snarky" and trying to defend your laziness?

For him, it is, because he can't troll a Google search.

--
Lew
Ceci n'est pas une fenêtre.
..___________.
|###] | [###|
|##/ | *\##|
|#/ * | \#|
|#----|----#|
|| | * ||
|o * | o|
|_____|_____|
|===========|
 
L

Lew

Mike said:
A fair amount of what was added in Java 5 (generics aside) was syntactic sugar:

* Variable-parameter functions
* Autoboxing
* The enhanced for loop

The last of these is one of my favorite things in the whole language.

for ( int ix = 0; ix < limit; ++ix )

is syntactic sugar for a 'while' loop.

'+=' is syntactic sugar for "add and assign".

'?:' is syntactic sugar for a simple 'if/else'.

Leaving implicit the default constructor or the 'super()' call at the top of a
constructor are syntactic sugar.

Auto-initialization of member fields to their zero-like value is syntactic sugar.

'synchronized' is syntactic sugar for taking out (and releasing!) a lock on a
monitor.

'import' is syntactic sugar for FQNs.

Yeah, Roedy, Java has almost no syntactic sugar!

--
Lew
Ceci n'est pas une fenêtre.
..___________.
|###] | [###|
|##/ | *\##|
|#/ * | \#|
|#----|----#|
|| | * ||
|o * | o|
|_____|_____|
|===========|
 
D

Daniele Futtorovic

1. You grossly underestimate my latency. I hate waiting for webpages to
load.
2. Asking is still quicker than messing around trying multiple google
queries.
3. Asking someone who definitely knows the answer and can rattle it off
in a couple of seconds flat may well result in less total human labor
than a moderate amount of googling.
4. I am not under any obligation that I know of to google, or to avoid
asking such questions.
5. Anyone who disliked my question was perfectly free to ignore it.

a) Ken is right
b) Y'all wasting perfectly fine bandwidth here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top