Go Back   Velocity Reviews > Newsgroups > Java
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Java - UTF-8 problems with windows

 
Thread Tools Search this Thread
Old 08-13-2009, 01:38 PM   #21
Default Re: UTF-8 problems with windows


Tom Anderson wrote:
> On Wed, 12 Aug 2009, Mike Schilling wrote:
>
>> And I'd add:
>> NullPointerExceptions in a language that insists it doesn't have
>> pointers.

>
> Where in the JLS does it insist - or even vaguely affirm - that it
> doesn't have pointers?


Quite the opposite - the JLS explicity states that the language has pointers,
indeed, that "reference values (often just references) are pointers" (JLS §4.3.1)

> From the index:
>
> pointers
> See references
>
> ISTM that the JLS considers the two words to be synonyms.


Say rather that that the JLS defines the two words to be synonyms. Thus,
every place the JLS says "reference" it explicitly means "pointer".

--
Lew


Lew
  Reply With Quote
Old 08-13-2009, 03:41 PM   #22
Mike Schilling
 
Posts: n/a
Default Re: UTF-8 problems with windows
Tom Anderson wrote:
> On Wed, 12 Aug 2009, Mike Schilling wrote:
>
>> And I'd add:
>> NullPointerExceptions in a language that insists it doesn't have
>> pointers.

>
> Where in the JLS does it insist - or even vaguely affirm - that it
> doesn't have pointers?
>
> From the index:
>
> pointers
> See references
>
> ISTM that the JLS considers the two words to be synonyms.



I think someone already quoted this, but if not:

http://www.j2ee.me/docs/white/langenv/Simple.doc2.html

A White Paper

May 1996
James Gosling
Henry McGilton

2.2.9 No More Pointers
Most studies agree that pointers are one of the primary features that
enable programmers to inject bugs into their code. Given that
structures are gone, and arrays and strings are objects, the need for
pointers to these constructs goes away. Thus, Java has no pointer data
types. Any task that would require arrays, structures, and pointers in
C can be more easily and reliably performed by declaring objects and
arrays of objects. Instead of complex pointer manipulation on array
pointers, you access arrays by their arithmetic indices. The Java
run-time system checks all array indexing to ensure indices are within
the bounds of the array.
You no longer have dangling pointers and trashing of memory because of
incorrect pointers, because there are no pointers in Java.

(f you want to argue that a white paper by the primary inventor of the
langauge is irrelevant, feel free, but you might as well be showing
off the latest Obama Kenyan birth certificate.)




Mike Schilling
  Reply With Quote
Old 08-14-2009, 03:29 AM   #23
Lew
 
Posts: n/a
Default Re: UTF-8 problems with windows
Matt Humphrey wrote:
> Sure, Java has pointers. They're simply completely different from what the
> rest of computing calls pointers--addresses into memory.
> http://en.wikipedia.org/wiki/Pointer_(computing)


Java pointers meet this definition.

> http://foldoc.org/pointer


And this one.

> http://www.webopedia.com/TERM/p/pointer.html .


And they meet this one.

> That's the "no true Scotsman" fallacy
> http://en.wikipedia.org/wiki/No_true_Scotsman.


How does this apply?

--
Lew


Lew
  Reply With Quote
Old 08-14-2009, 03:34 AM   #24
Lew
 
Posts: n/a
Default Re: UTF-8 problems with windows
Matt Humphrey wrote:
>> That's the "no true Scotsman" fallacy
>> http://en.wikipedia.org/wiki/No_true_Scotsman.


Lew wrote:
> How does this apply?


Wait, I know!

People read in Usenet that someone, I'll call him "Len", asserts that Java has
pointers. Hamish McDonald reads this article and shocked, declares that "Java
does not have pointers!" The next post cites chapter and verse from the JLS
and other sources to demonstrate that Java's "references" fit the definition
of pointers and are explicitly labeled as such in the language. Hamish says,
"Those are not true pointers!"

--
Lew


Lew
  Reply With Quote
Old 08-14-2009, 04:52 AM   #25
Mike Schilling
 
Posts: n/a
Default Re: UTF-8 problems with windows
Lew wrote:
> Mike Schilling wrote:
>> Tom Anderson wrote:
>>> On Wed, 12 Aug 2009, Mike Schilling wrote:
>>>
>>>> And I'd add:
>>>> NullPointerExceptions in a language that insists it doesn't have
>>>> pointers.
>>> Where in the JLS does it insist - or even vaguely affirm - that it
>>> doesn't have pointers?
>>>
>>> From the index:
>>>
>>> pointers
>>> See references
>>>
>>> ISTM that the JLS considers the two words to be synonyms.

>>
>>
>> I think someone already quoted this, but if not:
>>
>> http://www.j2ee.me/docs/white/langenv/Simple.doc2.html
>>
>> A White Paper
>>
>> May 1996
>> James Gosling
>> Henry McGilton
>>
>> 2.2.9 No More Pointers
>> Most studies agree that pointers are one of the primary features
>> that
>> enable programmers to inject bugs into their code. Given that
>> structures are gone, and arrays and strings are objects, the need
>> for
>> pointers to these constructs goes away. Thus, Java has no pointer
>> data types. Any task that would require arrays, structures, and
>> pointers in C can be more easily and reliably performed by
>> declaring
>> objects and arrays of objects. Instead of complex pointer
>> manipulation on array pointers, you access arrays by their
>> arithmetic indices. The Java run-time system checks all array
>> indexing to ensure indices are within the bounds of the array.
>> You no longer have dangling pointers and trashing of memory because
>> of incorrect pointers, because there are no pointers in Java.
>>
>> (f you want to argue that a white paper by the primary inventor of
>> the langauge is irrelevant, feel free, but you might as well be
>> showing off the latest Obama Kenyan birth certificate.)

>
> There is a distinction. The paper says there are no "pointer data
> types". This does not contradict the JLS that says "references ...
> are pointers". There are indeed pointers in Java, and there are
> indeed no pointer data types.


Of course there are pointers, even though that white paper insists
that there are not. But the word "pointer" has been whitewashed away:
there's no language construct, system class, method, or field called
pointer, except ... NullPointerException. I'm guessing that it was
called that before pointer was declared an unconcept, and had become
too prevalent to change easily. Why else wouldn't it be called
NullReferenceException? And that's precisely the sort of anachronism
this subthread is discussing.




Mike Schilling
  Reply With Quote
Old 08-14-2009, 01:51 PM   #26
Lew
 
Posts: n/a
Default Re: UTF-8 problems with windows
Matt Humphrey wrote:
> Good point. But if the JLS asserts that references are pointers and
> pointers are addressess into memory, does the JLS require that references
> *be* addresses into memory?


Java references are addresses into memory - they point to objects to which
they refer. They aren't exposed to the programmer as *machine* addresses, but
then Java is not a machine language.

--
Lew


Lew
  Reply With Quote
Old 08-18-2009, 10:45 AM   #27
Michael Jung
 
Posts: n/a
Default Re: UTF-8 problems with windows
Roedy Green <> writes:
> The way I see it, whether what I say solves the O.P.'s particular
> problem is secondary. I am talking to the broader audience of people
> who have similar problems, and people who may later find the thread
> with google.


> I feel disgust at an O.P. who complains when someone posts information
> he already knows or that is not relevant to his particular problem, as
> if the whole point of the newsgroup were to serve him alone.
> Who does he think he is, the CEO of a company I work for?


It might be that an OP has a similar blurry view and is trying to
ascertain whether you understood the problem correctly. Under the
assumption that you were trying to help him not posterity.

Michael


Michael Jung
  Reply With Quote
Old 08-18-2009, 11:46 PM   #28
Arne Vajhøj
 
Posts: n/a
Default Re: UTF-8 problems with windows
Roedy Green wrote:
> On Wed, 12 Aug 2009 22:08:49 +0200, Michael Jung
> <> wrote, quoted or indirectly quoted someone
> who said :
>
>> You know that that one is meaningless in the context the question
>> arose in?

>
> For me, reading most posts is like reading a foreign language. I can
> pick out a few keywords, and I guess at the general problem area, and
> I hand out some standard advice.


> I find it difficult to disginguish between somebody explaining
> something complicated, and somebody who has no clue. I don't have the
> patience for detailed analysis.


If you do not have the time/will/whatever to actually read and
understand the question, then you should not try and answer.

> The way I see it, whether what I say solves the O.P.'s particular
> problem is secondary. I am talking to the broader audience of people
> who have similar problems, and people who may later find the thread
> with google.


Those searching would attempt to find threads about their problem, so
if your answer is not relevant for the question, then your answer is
not relevant for those finding it via Google later.

Arne


Arne Vajhøj
  Reply With Quote
Old 08-21-2009, 02:08 AM   #29
Roedy Green
 
Posts: n/a
Default Re: UTF-8 problems with windows
On Fri, 14 Aug 2009 08:51:13 -0400, Lew <> wrote,
quoted or indirectly quoted someone who said :

>
>Java references are addresses into memory - they point to objects to which
>they refer. They aren't exposed to the programmer as *machine* addresses, but
>then Java is not a machine language.


In the original JVMs, references were handles, pointers to pointers.
That made it easier to shuffle objects around in RAM.
--
Roedy Green Canadian Mind Products
http://mindprod.com

http://thecovemovie.com : The Cove: a documentary about Japan's secret atrocities against dolphins.


Roedy Green
  Reply With Quote
Old 08-21-2009, 06:18 AM   #30
Lew
 
Posts: n/a
Default Re: UTF-8 problems with windows
Roedy Green wrote:
> On Fri, 14 Aug 2009 08:51:13 -0400, Lew <> wrote,
> quoted or indirectly quoted someone who said :
>
>> Java references are addresses into memory - they point to objects to which
>> they refer. They aren't exposed to the programmer as *machine* addresses, but
>> then Java is not a machine language.

>
> In the original JVMs, references were handles, pointers to pointers.
> That made it easier to shuffle objects around in RAM.


What they are in the JVM is independent of the fact that in the Java language
references function as memory addresses, at a high level. Due to the
restricted nature of references in Java - you can't assign arbitrary pointer
values such as mid-object addresses, for example - this high-level abstraction
of an address is sufficient.

--
Lew


Lew
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Reset / Recover Forgotten Windows NT / 2000 / XP / 2003 Administrator Password wskaihd Software 2 11-17-2009 02:01 AM
How to activate Remote Assistance with XP using Windows Live Messenger Oziisr General Help Related Topics 0 02-01-2008 04:45 PM
Computer Security aldrich.chappel.com.use@gmail.com A+ Certification 0 11-27-2007 02:11 AM
MCITP: Enterprise Support Technician MileHighWelch MCITP 1 06-19-2007 10:25 PM
Re: Question about MS critical updates John Coode A+ Certification 0 06-30-2004 06:08 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46