ISA-independent programming language
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
ISA-independent programming language
Goto page Previous  1, 2, 3, 4, 5, 6
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Computer Architecture
Author Message
Jan Vorbrüggen
Guest





Posted: Tue Aug 23, 2005 4:15 pm    Post subject: Re: ISA-independent programming language Reply with quote

Quote:
Variable size can be exactly specified in PL/I, but it is normally
expected that the compiler will choose the next convenient size.

Fortran 90 et seq. have exactly the same model.

Jan
Back to top
Jan Vorbrüggen
Guest





Posted: Tue Aug 23, 2005 4:15 pm    Post subject: Re: ISA-independent programming language Reply with quote

Quote:
To be fair, many people seem to claim that pointer != reference. I assume
that perspective comes from a "pointer = memory address" perspective
(I'm unclear what the difference would be otherwise, except possibly
pointer = reference+offset).

Oh, a pointer can be much more than that. In Fortran 90 et seq., you could
define, by way of example,

Real :: Array (1:10, -5:5, 0:9)
Real, Pointer :: P

and then set

P = Array (1:10:2, 5:-5:-1, (/0,8,2,6,4/))

and then do

Call Do_Something (P)

which will operate on an array of dimension (5, 11, 5) that seems to be
virtually contiguous, but accesses the specified array elements in the
order specified. It is the compiler's responsibility to build a data
structure that can deliver this transparently, but to the programmer this
pointer is just an opaque data structure that he passes around and that
he knows will get the work done.

Jan
Back to top
mihai cartoaje
Guest





Posted: Wed Aug 24, 2005 8:05 am    Post subject: Re: ISA-independent programming language Reply with quote

Nothing is wrong with java.

You mean starting with java and adding pointers? I have not thought
about how to do it. Maybe someone else can take the challenge.
Back to top
mihai cartoaje
Guest





Posted: Wed Aug 24, 2005 8:12 am    Post subject: Re: ISA-independent programming language Reply with quote

No reason. Pointers can be pirate maps.
Back to top
Patricia Shanahan
Guest





Posted: Wed Aug 24, 2005 8:15 am    Post subject: Re: ISA-independent programming language Reply with quote

mihai cartoaje wrote:
Quote:
Nothing is wrong with java.

You mean starting with java and adding pointers? I have not thought
about how to do it. Maybe someone else can take the challenge.


Adding pointers to Java is trivial, because it already has them. Every
non-null Java reference is a pointer.

See the Java Language Specification: "The reference values (often just
references) are pointers to these objects, and a special null reference,
which refers to no object."

[4.3.1 Objects,
http://java.sun.com/docs/books/jls/second_edition/html/typesValues.doc.html#12028]

Patricia
Back to top
Nick Maclaren
Guest





Posted: Wed Aug 24, 2005 8:15 am    Post subject: Re: ISA-independent programming language Reply with quote

In article <1124852733.160354.169450@g47g2000cwa.googlegroups.com>,
mihai cartoaje <repstsb@yahoo.ca> wrote:
Quote:
Nothing is wrong with java.

Really? You clearly haven't looked at it carefully enough. Please
do so before posting such statements again.


Regards,
Nick Maclaren.
Back to top
glen herrmannsfeldt
Guest





Posted: Thu Aug 25, 2005 12:15 am    Post subject: Re: ISA-independent programming language Reply with quote

Nick Maclaren wrote:

Quote:
In article <1124852733.160354.169450@g47g2000cwa.googlegroups.com>,
mihai cartoaje <repstsb@yahoo.ca> wrote:

Nothing is wrong with java.

Really? You clearly haven't looked at it carefully enough.
Please do so before posting such statements again.

In the context of the discussion, defined widths for data
types, defined twos complement, defined big endian external
representation, pointer size is invisible to the program,
defined IEEE floating point.

I do agree that there are things that could have been
done better, but within those requirements it seems to
me that Java satisfies them all.

Now, consider C: There are minimum widths for data types,
but no maximum. Ones complement or signed magnitude are
allowed for signed data. One must be careful with endianness
when data might transfer to another machine. Many people
get lazy when only working on one machine and don't consider
possible non-portability of their code.

-- glen
Back to top
glen herrmannsfeldt
Guest





Posted: Thu Aug 25, 2005 12:15 am    Post subject: Re: ISA-independent programming language Reply with quote

Jan Vorbrüggen wrote:

Quote:
Variable size can be exactly specified in PL/I, but it is normally

expected that the compiler will choose the next convenient size.

Fortran 90 et seq. have exactly the same model.

PL/I has a slightly different model. One can specify the width
in either binary bits or decimal digits. Some, but not all,
implementations used BCD arithmetic for FIXED DECIMAL.

For fixed point, PL/I allows one to specify the number of
bits or decimal digits after the binary point or decimal point,
respectively (even negative or more than the width).
Proper scaling will be applied when operations are performed
on data with different scale factors.

Floating point data can also be specified in terms of bits
or decimal digits. Systems that I know of use binary arithmetic
for both, but on a machine allowing both binary and decimal floating
point one might expect FLOAT DECIMAL to use decimal floating
point.

Fortran allows for some, but not all, of those features.

-- glen
Back to top
Nick Maclaren
Guest





Posted: Thu Aug 25, 2005 12:15 am    Post subject: Re: ISA-independent programming language Reply with quote

In article <0KednZ2dnZ08PgSWnZ2dnUlakd6dnZ2dRVn-y52dnZ0@comcast.com>,
glen herrmannsfeldt <gah@ugcs.caltech.edu> wrote:
Quote:
Nick Maclaren wrote:

In article <1124852733.160354.169450@g47g2000cwa.googlegroups.com>,
mihai cartoaje <repstsb@yahoo.ca> wrote:

Nothing is wrong with java.

Really? You clearly haven't looked at it carefully enough.
Please do so before posting such statements again.

In the context of the discussion, defined widths for data
types, defined twos complement, defined big endian external
representation, pointer size is invisible to the program,
defined IEEE floating point.

And, specifically, none of scalability, portability to new paradigms,
performance or high RAS matter worth a damn. Er, yes, if that is
your target, I suppose Java IS flawless.

The flat statement "Nothing is wrong with Java" is, at best,
misleading.


Regards,
Nick Maclaren.
Back to top
mihai cartoaje
Guest





Posted: Wed Aug 31, 2005 5:49 am    Post subject: Re: ISA-independent programming language Reply with quote

I intended to write about C-like pointers which can take a value from
an int.

mihai
--
a wip windowing program for svgalib at,
http://sourceforge.net/projects/svgalib-windows
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Computer Architecture All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6
Page 6 of 6

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB