Hello Reiner,

My comments mentioned below in bold. May I request your reply on the same..

On 4/24/10, Reinier Zwitserloot <[email protected]> wrote:
>
> Typing Systems 101. HINT: The understanding of weak/strong typing
> expressed in this thread is mostly wrong.
>
> Dimension 1: Strong vs. Weak: While ever so often this dimension gets
> interpreted as automatic type coercion or not, that's not really the
> case. Note that if it means automatic type coercion, virtually all
> languages ever written are WEAK, including java. After all, "" + true
> works out and automatically coerces the boolean into a string first.
> So does "2 + 5.0", which will coerce the integer '2' to a double. The
> only exception I know of is Haskell.
>
> What it really means is: Do OBJECTS know their own types, and do they
> police this fact?
>
> For example, C is weakly typed. If you cast an object to a type that
> it isn't, you can do that. And usually core dumps occur. C also has no
> such concept as 'instanceof', which is a clear sign of a strong
> language. Python, Java, C#, and Scala are all strongly typed.

 * One of the major advantages of Java is that the latter focusses on
business *
*  sense. Again, to be technical, we need to consider the amount of methods
that the language can handle  after which its distributive architecture goes
haywire.. Though Java gives us a lot of freedom, but we seem *
*to be missing the fact that this language has a veyr thin line to walk on
to get the highest leve lof performance. Again, it is not about the strongly
typed or wealky typed, but rather how well does this allow us to get the
optimum performance..*
*Java does seem to have their own types and that gives us better control
over objects,especially in a very complex and distributive environment.. C /
Python dont seem to have that kind of ability to do what java does..*
*As I said, you seem to be right on this point..*

Dimension 2: Dynamic vs. Static: Whilst dimension 1 was all about the
objects themselves, Dynamic v. Static is about variables. Variables
are distinct from objects. A variable is basically a pointer, or a
'reference'. Do these references hold types? In java, yes: You write
"String x" and not "var x". In python, no: Variables just exist and
you can shove whatever you want in them. Generally speaking, in
dynamic languages, you can try any construct on an object and a check
to ensure that the object even contains this construct is done at
runtime. In other words, you can call any method on any object, and at
runtime you'll get an error if said object doesn't have that method.
In static languages, on the other hand, the reference has to have the
appropriate type. Java is static. Python and Ruby and javascript
aren't.

*Yes again..Good point.However, it is not about static and dynamic but
rather baout more control and specific handling of logic for better
implementation. *
**
*Again a point outside this discussion, Java gives you automation and more
control , a state in which **your code can improve without any need for
human intervention(this seems to be some time away but hopefully this will
happen soon..I have my fingers crossed).*
**
*If you have observed, java seems to be automating most of our coding
efforts and thats good..The signs of a good language..However, certain
traits like execution seem to be getting sacrificed..One of the effects is
the static vs. dynamic argument that you mention above..*

Dimension 3: Manifest vs. Latent typing. Scala seems 'dynamic' because
you can write 'var x' or 'val x' instead of 'String x'. But they
aren't - the type of 'x' in: "var x = "foo"" in scala is still String,
it's just inferred. Languages that infer types are latent languages.
Languages that force you to be explicit about it are manifest
languages. As usual this isn't a black and white kind of deal. Java is
probably the most manifest language ever designed, whereas something
like haskell is very latent. Scala is somewhere in the middle. Even
java has latent bits, though. Such as inference of generics in
methods.
*I am not well-versed with Scala s oI cannot comment on the above..*

Dimension 4: Nominal vs. Structural. In a nominal language, types have
names. For example, in java, which is almost entirely nominal, you
have Guns and Cameras. You don't have "thingies that have a shoot()
method". Even if both the Gun interface and the Camera interface have
a shoot method, guns aren't cameras, and you can't cast one to the
other or treat one as the other. In structural languages, you CAN -
the only important fact is that a certain type has a certain construct
in it. Here, too, you can have hybrids. For example in scala you can
create an ad-hoc interface that means: "Anything that has method X()
in it", and any object that does can be cast to this, and then you can
call X on it. Regardless of name. You really could create a Shootable
interface and ad-hoc cast both Guns and Cameras to this. In java, you
can't. However, java does have some structural bits. For example,
executable classes are structurally defined: It's anything that has a
method with signature "public static void main(String[] args)" in it.
That's structural, obviously. The nominal solution would have been to
create an "Executable" interface containing "public void main(String[]
args)" and adding a rider that the JVM will call your no-args
constructor before invoking your main method.
*Nice explanation..Agreed fully..*


Java is 99% Nominal, 90% Manifest, 90% Static and 100% Strong. Most
other languages aren't that easily described. For example, scala is
about 70% Nominal, 65% Latent, 95% static and 100% Strong.
*Again , no comments on this fo rreasons stated above..*
**

For example, even java isn't 100% static because 'null' not being part
of java's type system is clearly a dynamic quirk. Any given reference
of type "String" for example can contain either a string OR not a
string (null), and this isn't in the type system. One can imagine a
language that has no null, or a language that does, but only the type
"String?" can hold it, and not "String".
*I beg to differ on this..Null is a dataype that can be used by any of the
other tyoes, userdefined or system based..*
*You raise an important point of null not being a part of the type
system..The presence of the Class type seems to be a reason for this..Again,
Java is a top-down rather than a bottom-up language in referencing objects..
You have to scale the *
*higher objects first to get the handle to lower classes..Null seems to defy
this rule and is out of sync of the class hierarchy.. Again, this leads to
problems in implementation (ambuigity and cross-referencing) and thus could
be very problematic for businesses. No wonder null is not a part of the
system..However, this is an exception rather than an ambiguity..*
**
**
*Thanks a billion,*
*Jitesh Dundas

*
On Apr 23, 2:57 pm, Robert Casto <[email protected]> wrote:
> I think the issue has to do with features and functionality. They want to
be
> more productive and with these new languages, you can do that. I think
your
> concerns are valid though. Unless you are careful, there are plenty of
> opportunities for bugs. The new languages do a lot of things better and
they
> are trying to eliminate the problems you mention. Still, I like being told
> about problems at compile time rather than during testing or worse, in
> production. I came to Java from C/C++ and enjoyed the garbage collection,
> simpler reference handling, and other features. These new languages are
much
> more productive, but there are always tradeoffs.
>
>
>
>
>
> On Thu, Apr 22, 2010 at 2:06 PM, scphantm <[email protected]> wrote:
> > ive been looking a few languages the past few days, groovy, ruby being
> > the big two.  i see all over the web people praising the world of
> > dynamic type languages and the same question keeps ringing in my head,
> > WHY IN THE WORLD WOULD YOU WANT A DYNAMIC TYPING LANGUAGE????  i came
> > to java from the VB and PHP world.  both of those are dynamically
> > typed and it was that one thing that drove me nuts.  especially in
> > working with teams of developers.  when i moved to java and its static
> > typing system, everything finally made sense, tweetie birds were
> > flying, humming birds were humming around around and i was in love, i
> > found a language that is quick and has inherent type checking built in
> > at compile time.
>
> > i just remember the disasters and amount of bugs that occured with me
> > in the dark days of (god help me) asp, vbscript, and to an extent PHP
> > and don't understand why anyone in their right mind would not want
> > their language of choice to be statically typed?  ive heard the answer
> > of, well its easier, in this case in my mind easy=lazy.  i don't get
> > it, please educate me.
>
> > --
> > You received this message because you are subscribed to the Google
Groups
> > "The Java Posse" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<javaposse%[email protected]>
<javaposse%2bunsubscr...@googlegroups .com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/javaposse?hl=en.
>
> --
> Robert Castowww.IWantFreeShipping.com
> Find Amazon Filler Items easily!
>
> --
> You received this message because you are subscribed to the Google Groups
"The Java Posse" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
[email protected]<javaposse%[email protected]>
.
> For more options, visit this group athttp://
groups.google.com/group/javaposse?hl=en.

--
You received this message because you are subscribed to the Google Groups
"The Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected]<javaposse%[email protected]>
.
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to