Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #15002 > unrolled thread

Re: eerie Java-BASIC (partially OT)

Started byArne Vajhøj <arne@vajhoej.dk>
First post2012-06-02 10:39 -0400
Last post2012-06-16 23:30 -0400
Articles 20 on this page of 22 — 7 participants

Back to article view | Back to comp.lang.java.programmer

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: eerie Java-BASIC (partially OT) Arne Vajhøj <arne@vajhoej.dk> - 2012-06-02 10:39 -0400
    Re: eerie Java-BASIC (partially OT) Arne Vajhøj <arne@vajhoej.dk> - 2012-06-02 10:40 -0400
      Re: eerie Java-BASIC (partially OT) Lew <noone@lewscanon.com> - 2012-06-02 09:41 -0700
        Re: eerie Java-BASIC (partially OT) Roedy Green <see_website@mindprod.com.invalid> - 2012-06-03 00:44 -0700
          Re: eerie Java-BASIC (partially OT) Arne Vajhøj <arne@vajhoej.dk> - 2012-06-03 09:18 -0400
        Re: eerie Java-BASIC (partially OT) Arne Vajhøj <arne@vajhoej.dk> - 2012-06-03 09:15 -0400
          Re: eerie Java-BASIC (partially OT) BGB <cr88192@hotmail.com> - 2012-06-03 13:50 -0500
          Re: eerie Java-BASIC (partially OT) Gene Wirchenko <genew@ocis.net> - 2012-06-03 19:29 -0700
            Re: eerie Java-BASIC (partially OT) Arne Vajhøj <arne@vajhoej.dk> - 2012-06-16 23:35 -0400
              Re: eerie Java-BASIC (partially OT) Lew <noone@lewscanon.com> - 2012-06-16 23:29 -0700
                Re: eerie Java-BASIC (partially OT) Arne Vajhøj <arne@vajhoej.dk> - 2012-06-17 18:33 -0400
    Re: eerie Java-BASIC (partially OT) BGB <cr88192@hotmail.com> - 2012-06-03 13:26 -0500
      Re: eerie Java-BASIC (partially OT) Lew <noone@lewscanon.com> - 2012-06-03 12:13 -0700
        Re: eerie Java-BASIC (partially OT) BGB <cr88192@hotmail.com> - 2012-06-03 15:42 -0500
          Re: eerie Java-BASIC (partially OT) Lew <noone@lewscanon.com> - 2012-06-03 14:23 -0700
            Re: eerie Java-BASIC (partially OT) Lew <noone@lewscanon.com> - 2012-06-03 14:25 -0700
            Re: eerie Java-BASIC (partially OT) BGB <cr88192@hotmail.com> - 2012-06-05 09:22 -0500
              Re: eerie Java-BASIC (partially OT) Lew <lewbloch@gmail.com> - 2012-06-05 09:54 -0700
        Re: eerie Java-BASIC (partially OT) Arne Vajhøj <arne@vajhoej.dk> - 2012-06-16 23:34 -0400
          Re: eerie Java-BASIC (partially OT) "Mike Schilling" <mscottschilling@hotmail.com> - 2012-06-24 17:02 -0700
            Re: eerie Java-BASIC (partially OT) Lew <noone@lewscanon.com> - 2012-06-24 23:09 -0700
      Re: eerie Java-BASIC (partially OT) Arne Vajhøj <arne@vajhoej.dk> - 2012-06-16 23:30 -0400

Page 1 of 2  [1] 2  Next page →


#15002 — Re: eerie Java-BASIC (partially OT)

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-06-02 10:39 -0400
SubjectRe: eerie Java-BASIC (partially OT)
Message-ID<4fca25a2$0$284$14726298@news.sunsite.dk>
On 6/2/2012 7:39 AM, Stefan Ram wrote:
>    BASIC was the first programming language I learned and the
>    second programming language I was giving classes for (the
>    first one being Pascal).
>
>    In the next week, I will give my first VB class. So - for
>    preparation - I did have a look at some VB source code.
>    And I had an eerie feeling when reading the following part,
>    thinking: This is actually Java, just with a BASIC syntax!
>
> If ret.StartsWith("-") Or ret.StartsWith("/") Then Throw New Exception(...)
>
>    I mean, »String#startsWith« and »throw new Exception ...« are
>    not part of the classic BASIC, but surely are part of Java!
>
>    (But then, one can also dispute that VB actually /has/ a BASIC
>    syntax: There are no line numbers, it does not understand
>    LET, GOSUB nor »PRINT 1,2;3«. And of course, there is no
>    »MAT«, »DEF FN...« or READ/DATA. So it's Java with a made-up
>    syntax, which possibly partially resembles BASIC.)
>
>    Well, Java surely is influential. Maybe the
>    programming-language landscape will slowly converge to some
>    set of common features/classes and syntax.

If you with VB means VB.NET then you are absolutely correct.

VB.NET is C# with VB syntax and C# is close to a superset of Java.

And the .NET library is also rather close to the Java library.

Anders Hejlsberg worked on MS Java before he started working
on .NET and C#.

Arne

[toc] | [next] | [standalone]


#15003

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-06-02 10:40 -0400
Message-ID<4fca25f6$0$284$14726298@news.sunsite.dk>
In reply to#15002
On 6/2/2012 10:39 AM, Arne Vajhøj wrote:
> On 6/2/2012 7:39 AM, Stefan Ram wrote:
>> BASIC was the first programming language I learned and the
>> second programming language I was giving classes for (the
>> first one being Pascal).
>>
>> In the next week, I will give my first VB class. So - for
>> preparation - I did have a look at some VB source code.
>> And I had an eerie feeling when reading the following part,
>> thinking: This is actually Java, just with a BASIC syntax!
>>
>> If ret.StartsWith("-") Or ret.StartsWith("/") Then Throw New
>> Exception(...)
>>
>> I mean, »String#startsWith« and »throw new Exception ...« are
>> not part of the classic BASIC, but surely are part of Java!
>>
>> (But then, one can also dispute that VB actually /has/ a BASIC
>> syntax: There are no line numbers, it does not understand
>> LET, GOSUB nor »PRINT 1,2;3«. And of course, there is no
>> »MAT«, »DEF FN...« or READ/DATA. So it's Java with a made-up
>> syntax, which possibly partially resembles BASIC.)
>>
>> Well, Java surely is influential. Maybe the
>> programming-language landscape will slowly converge to some
>> set of common features/classes and syntax.
>
> If you with VB means VB.NET then you are absolutely correct.
>
> VB.NET is C# with VB syntax and C# is close to a superset of Java.
>
> And the .NET library is also rather close to the Java library.
>
> Anders Hejlsberg worked on MS Java before he started working
> on .NET and C#.

Note that this also somewhat imply that you should not
expect a general convergence in languages/libraries as
these similarities have a very specific explanation.

Arne

[toc] | [prev] | [next] | [standalone]


#15007

FromLew <noone@lewscanon.com>
Date2012-06-02 09:41 -0700
Message-ID<jqdfmi$be2$1@news.albasani.net>
In reply to#15003
Arne Vajhøj wrote:
> Arne Vajhøj wrote:
>> Stefan Ram wrote:
>>> BASIC was the first programming language I learned and the
>>> second programming language I was giving classes for (the
>>> first one being Pascal).
>>>
>>> In the next week, I will give my first VB class. So - for
>>> preparation - I did have a look at some VB source code.
>>> And I had an eerie feeling when reading the following part,
>>> thinking: This is actually Java, just with a BASIC syntax!
>>>
>>> If ret.StartsWith("-") Or ret.StartsWith("/") Then Throw New
>>> Exception(...)
>>>
>>> I mean, »String#startsWith« and »throw new Exception ...« are
>>> not part of the classic BASIC, but surely are part of Java!
>>>
>>> (But then, one can also dispute that VB actually /has/ a BASIC
>>> syntax: There are no line numbers, it does not understand
>>> LET, GOSUB nor »PRINT 1,2;3«. And of course, there is no
>>> »MAT«, »DEF FN...« or READ/DATA. So it's Java with a made-up
>>> syntax, which possibly partially resembles BASIC.)
>>>
>>> Well, Java surely is influential. Maybe the
>>> programming-language landscape will slowly converge to some
>>> set of common features/classes and syntax.
>>
>> If you with VB means VB.NET then you are absolutely correct.
>>
>> VB.NET is C# with VB syntax and C# is close to a superset of Java.
>>
>> And the .NET library is also rather close to the Java library.
>>
>> Anders Hejlsberg worked on MS Java before he started working
>> on .NET and C#.
>
> Note that this also somewhat imply that you should not
> expect a general convergence in languages/libraries as
> these similarities have a very specific explanation.

Yes, like that library designers tend to see a need for the same 
functionality, e.g., eliciting String prefixes, and they tend to use the 
obvious English-like names, e.g., "starts with".

But the designer and ecosystem stemming from C# does go a long way to explain 
such close similarities.

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

[toc] | [prev] | [next] | [standalone]


#15013

FromRoedy Green <see_website@mindprod.com.invalid>
Date2012-06-03 00:44 -0700
Message-ID<v95ms75ph6d4a1k1vrdvkouqokd9fb0nlj@4ax.com>
In reply to#15007
On Sat, 02 Jun 2012 09:41:00 -0700, Lew <noone@lewscanon.com> wrote,
quoted or indirectly quoted someone who said :

>Yes, like that library designers tend to see a need for the same 
>functionality, e.g., eliciting String prefixes, and they tend to use the 
>obvious English-like names, e.g., "starts with".

Long time ago at Univac they decided they wanted to redo all their
compilers with a common core and common optimiser. 

Microsoft did the same thing. The low level convergence means it is
cheap to add features to a language that are already supported in the
core. So it looks from the high level like languages are converging.
It also tends to make it expensive for a language to have a quirky way
of implementing some feature. It tends to shed those.
-- 
Roedy Green Canadian Mind Products
http://mindprod.com
Controlling complexity is the essence of computer programming.
~ Brian W. Kernighan 1942-01-01
.

[toc] | [prev] | [next] | [standalone]


#15015

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-06-03 09:18 -0400
Message-ID<4fcb6437$0$289$14726298@news.sunsite.dk>
In reply to#15013
On 6/3/2012 3:44 AM, Roedy Green wrote:
> On Sat, 02 Jun 2012 09:41:00 -0700, Lew<noone@lewscanon.com>  wrote,
> quoted or indirectly quoted someone who said :
>
>> Yes, like that library designers tend to see a need for the same
>> functionality, e.g., eliciting String prefixes, and they tend to use the
>> obvious English-like names, e.g., "starts with".
>
> Long time ago at Univac they decided they wanted to redo all their
> compilers with a common core and common optimiser.
>
> Microsoft did the same thing. The low level convergence means it is
> cheap to add features to a language that are already supported in the
> core. So it looks from the high level like languages are converging.
> It also tends to make it expensive for a language to have a quirky way
> of implementing some feature. It tends to shed those.

I know that Digital did this.

But MS?

I can only think of 2 widely used MS compilers that generates
native code: C/C++ and VB. And I have never heard that they use
the same backend.

For .NET languages then there should not be much backend as most of the
backend work has been delegated to the CLR JIT.

Arne

[toc] | [prev] | [next] | [standalone]


#15014

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-06-03 09:15 -0400
Message-ID<4fcb6368$0$295$14726298@news.sunsite.dk>
In reply to#15007
On 6/2/2012 12:41 PM, Lew wrote:
> Arne Vajhøj wrote:
>> Arne Vajhøj wrote:
>>> Stefan Ram wrote:
>>>> BASIC was the first programming language I learned and the
>>>> second programming language I was giving classes for (the
>>>> first one being Pascal).
>>>>
>>>> In the next week, I will give my first VB class. So - for
>>>> preparation - I did have a look at some VB source code.
>>>> And I had an eerie feeling when reading the following part,
>>>> thinking: This is actually Java, just with a BASIC syntax!
>>>>
>>>> If ret.StartsWith("-") Or ret.StartsWith("/") Then Throw New
>>>> Exception(...)
>>>>
>>>> I mean, »String#startsWith« and »throw new Exception ...« are
>>>> not part of the classic BASIC, but surely are part of Java!
>>>>
>>>> (But then, one can also dispute that VB actually /has/ a BASIC
>>>> syntax: There are no line numbers, it does not understand
>>>> LET, GOSUB nor »PRINT 1,2;3«. And of course, there is no
>>>> »MAT«, »DEF FN...« or READ/DATA. So it's Java with a made-up
>>>> syntax, which possibly partially resembles BASIC.)
>>>>
>>>> Well, Java surely is influential. Maybe the
>>>> programming-language landscape will slowly converge to some
>>>> set of common features/classes and syntax.
>>>
>>> If you with VB means VB.NET then you are absolutely correct.
>>>
>>> VB.NET is C# with VB syntax and C# is close to a superset of Java.
>>>
>>> And the .NET library is also rather close to the Java library.
>>>
>>> Anders Hejlsberg worked on MS Java before he started working
>>> on .NET and C#.
>>
>> Note that this also somewhat imply that you should not
>> expect a general convergence in languages/libraries as
>> these similarities have a very specific explanation.
>
> Yes, like that library designers tend to see a need for the same
> functionality, e.g., eliciting String prefixes, and they tend to use the
> obvious English-like names, e.g., "starts with".

It is obviously a good name.

But there are other good names.

begin with
start is
first is
has prefix

etc.

> But the designer and ecosystem stemming from C# does go a long way to
> explain such close similarities.

Difficult not to assume some inspiration.

Arne

[toc] | [prev] | [next] | [standalone]


#15018

FromBGB <cr88192@hotmail.com>
Date2012-06-03 13:50 -0500
Message-ID<jqgbqf$eph$1@news.albasani.net>
In reply to#15014
On 6/3/2012 8:15 AM, Arne Vajhøj wrote:
> On 6/2/2012 12:41 PM, Lew wrote:
>> Arne Vajhøj wrote:
>>> Arne Vajhøj wrote:
>>>> Stefan Ram wrote:
>>>>> BASIC was the first programming language I learned and the
>>>>> second programming language I was giving classes for (the
>>>>> first one being Pascal).
>>>>>
>>>>> In the next week, I will give my first VB class. So - for
>>>>> preparation - I did have a look at some VB source code.
>>>>> And I had an eerie feeling when reading the following part,
>>>>> thinking: This is actually Java, just with a BASIC syntax!
>>>>>
>>>>> If ret.StartsWith("-") Or ret.StartsWith("/") Then Throw New
>>>>> Exception(...)
>>>>>
>>>>> I mean, »String#startsWith« and »throw new Exception ...« are
>>>>> not part of the classic BASIC, but surely are part of Java!
>>>>>
>>>>> (But then, one can also dispute that VB actually /has/ a BASIC
>>>>> syntax: There are no line numbers, it does not understand
>>>>> LET, GOSUB nor »PRINT 1,2;3«. And of course, there is no
>>>>> »MAT«, »DEF FN...« or READ/DATA. So it's Java with a made-up
>>>>> syntax, which possibly partially resembles BASIC.)
>>>>>
>>>>> Well, Java surely is influential. Maybe the
>>>>> programming-language landscape will slowly converge to some
>>>>> set of common features/classes and syntax.
>>>>
>>>> If you with VB means VB.NET then you are absolutely correct.
>>>>
>>>> VB.NET is C# with VB syntax and C# is close to a superset of Java.
>>>>
>>>> And the .NET library is also rather close to the Java library.
>>>>
>>>> Anders Hejlsberg worked on MS Java before he started working
>>>> on .NET and C#.
>>>
>>> Note that this also somewhat imply that you should not
>>> expect a general convergence in languages/libraries as
>>> these similarities have a very specific explanation.
>>
>> Yes, like that library designers tend to see a need for the same
>> functionality, e.g., eliciting String prefixes, and they tend to use the
>> obvious English-like names, e.g., "starts with".
>
> It is obviously a good name.
>
> But there are other good names.
>
> begin with
> start is
> first is
> has prefix
>

Prefix Compare
...


or, hell, they could have just mapped a bunch of C like or C++ like APIs 
onto .NET instead.

"fopen"/"fread"/"printf"/... anyone?

"if(s1.strcmp(s2)==0)"?

...


> etc.
>
>> But the designer and ecosystem stemming from C# does go a long way to
>> explain such close similarities.
>
> Difficult not to assume some inspiration.
>

especially when many of the other library classes and methods are 
considered as well.

it seems unlikely that MS would independently reinvent many "nearly 
identical" classes, with the primary difference often being mostly that 
"java" and "java.lang" were replaced by "System", ...

[toc] | [prev] | [next] | [standalone]


#15026

FromGene Wirchenko <genew@ocis.net>
Date2012-06-03 19:29 -0700
Message-ID<a97os7tpdjdphqgieo14vviftcip7hlh3v@4ax.com>
In reply to#15014
On Sun, 03 Jun 2012 09:15:20 -0400, Arne Vajhøj <arne@vajhoej.dk>
wrote:

>On 6/2/2012 12:41 PM, Lew wrote:

[snip]

>> Yes, like that library designers tend to see a need for the same
>> functionality, e.g., eliciting String prefixes, and they tend to use the
>> obvious English-like names, e.g., "starts with".
>
>It is obviously a good name.
>
>But there are other good names.
>
>begin with
>start is
>first is
>has prefix
>
>etc.

     Or for that matter, left().

[snip]

Sincerely,

Gene Wirchenko

[toc] | [prev] | [next] | [standalone]


#15349

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-06-16 23:35 -0400
Message-ID<4fdd5082$0$287$14726298@news.sunsite.dk>
In reply to#15026
On 6/3/2012 10:29 PM, Gene Wirchenko wrote:
> On Sun, 03 Jun 2012 09:15:20 -0400, Arne Vajhøj <arne@vajhoej.dk>
> wrote:
>
>> On 6/2/2012 12:41 PM, Lew wrote:
>
> [snip]
>
>>> Yes, like that library designers tend to see a need for the same
>>> functionality, e.g., eliciting String prefixes, and they tend to use the
>>> obvious English-like names, e.g., "starts with".
>>
>> It is obviously a good name.
>>
>> But there are other good names.
>>
>> begin with
>> start is
>> first is
>> has prefix
>>
>> etc.
>
>       Or for that matter, left().
>
> [snip]

left is

Just left will give associations to extracting the left most
n characters.

Arne

[toc] | [prev] | [next] | [standalone]


#15355

FromLew <noone@lewscanon.com>
Date2012-06-16 23:29 -0700
Message-ID<jrjtgj$90a$1@news.albasani.net>
In reply to#15349
Arne Vajhøj wrote:
> Gene Wirchenko wrote:
>> Arne Vajhøj wrote:
>>> Lew wrote:
>> [snip]
>>
>>>> Yes, like that library designers tend to see a need for the same
>>>> functionality, e.g., eliciting String prefixes, and they tend to use the
>>>> obvious English-like names, e.g., "starts with".
>>>
>>> It is obviously a good name.
>>>
>>> But there are other good names.
>>>
>>> begin with
>>> start is
>>> first is
>>> has prefix
>>>
>>> etc.
>>
>> Or for that matter, left().
>>
>> [snip]
>
> left is
>
> Just left will give associations to extracting the left most
> n characters.

"left[most]" and "startWith" are not the same across all locales.

So while "prefix" is semantically equivalent to the proposed "startsWith" 
(assuming the natural-language meaning), "left" would have to be a different 
method.

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

[toc] | [prev] | [next] | [standalone]


#15363

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-06-17 18:33 -0400
Message-ID<4fde5b51$0$283$14726298@news.sunsite.dk>
In reply to#15355
On 6/17/2012 2:29 AM, Lew wrote:
> Arne Vajhøj wrote:
>> Gene Wirchenko wrote:
>>> Arne Vajhøj wrote:
>>>> Lew wrote:
>>> [snip]
>>>
>>>>> Yes, like that library designers tend to see a need for the same
>>>>> functionality, e.g., eliciting String prefixes, and they tend to
>>>>> use the
>>>>> obvious English-like names, e.g., "starts with".
>>>>
>>>> It is obviously a good name.
>>>>
>>>> But there are other good names.
>>>>
>>>> begin with
>>>> start is
>>>> first is
>>>> has prefix
>>>>
>>>> etc.
>>>
>>> Or for that matter, left().
>>>
>>> [snip]
>>
>> left is
>>
>> Just left will give associations to extracting the left most
>> n characters.
>
> "left[most]" and "startWith" are not the same across all locales.

Good point.

Arne

[toc] | [prev] | [next] | [standalone]


#15016

FromBGB <cr88192@hotmail.com>
Date2012-06-03 13:26 -0500
Message-ID<jqgad6$bp7$1@news.albasani.net>
In reply to#15002
On 6/2/2012 9:39 AM, Arne Vajhøj wrote:
> On 6/2/2012 7:39 AM, Stefan Ram wrote:
>> BASIC was the first programming language I learned and the
>> second programming language I was giving classes for (the
>> first one being Pascal).
>>
>> In the next week, I will give my first VB class. So - for
>> preparation - I did have a look at some VB source code.
>> And I had an eerie feeling when reading the following part,
>> thinking: This is actually Java, just with a BASIC syntax!
>>
>> If ret.StartsWith("-") Or ret.StartsWith("/") Then Throw New
>> Exception(...)
>>
>> I mean, »String#startsWith« and »throw new Exception ...« are
>> not part of the classic BASIC, but surely are part of Java!
>>
>> (But then, one can also dispute that VB actually /has/ a BASIC
>> syntax: There are no line numbers, it does not understand
>> LET, GOSUB nor »PRINT 1,2;3«. And of course, there is no
>> »MAT«, »DEF FN...« or READ/DATA. So it's Java with a made-up
>> syntax, which possibly partially resembles BASIC.)
>>
>> Well, Java surely is influential. Maybe the
>> programming-language landscape will slowly converge to some
>> set of common features/classes and syntax.
>
> If you with VB means VB.NET then you are absolutely correct.
>
> VB.NET is C# with VB syntax and C# is close to a superset of Java.
>

generally, yes.

but, a person could try to argue that they are "totally different", say 
because of using "namespace" and "using" rather than "package" and 
"import", and ":" in class definitions instead of "extends" and 
"implements", ...

however, these are likely minor differences (many are primarily 
cosmetic, and some others could conceivably be made to work on the JVM 
as well).


> And the .NET library is also rather close to the Java library.
>
> Anders Hejlsberg worked on MS Java before he started working
> on .NET and C#.
>

yeah, pretty much.

there is a lot of overlap, although to me it looks like in some cases 
things were simplified and merged vs Java, for example, in Java there 
are a lot of classes for file IO with only minor variations, whereas in 
.NET a smaller number of classes fill a similar role.

there are also many cases where the classes have the same names, and 
many methods with the same names and arguments (although using 
FirstLetterCaps rather than camelCase, ...).


but, there are many differences as well.

[toc] | [prev] | [next] | [standalone]


#15019

FromLew <noone@lewscanon.com>
Date2012-06-03 12:13 -0700
Message-ID<jqgd0b$hfj$1@news.albasani.net>
In reply to#15016
BGB wrote:
> Arne Vajhøj wrote:
>> If you with VB means VB.NET then you are absolutely correct.
>>
>> VB.NET is C# with VB syntax and C# is close to a superset of Java.
>>
>
> generally, yes.
>
> but, a person could try to argue that they are "totally different", say
> because of using "namespace" and "using" rather than "package" and "import",
> and ":" in class definitions instead of "extends" and "implements", ...
>
> however, these are likely minor differences (many are primarily cosmetic, and
> some others could conceivably be made to work on the JVM as well).

"namespace" and "using" are significantly different from 'package' and 
'import' in semantics.

>> And the .NET library is also rather close to the Java library.
>>
>> Anders Hejlsberg worked on MS Java before he started working
>> on .NET and C#.
>
> yeah, pretty much.
>
> there is a lot of overlap, although to me it looks like in some cases things
> were simplified and merged vs Java, for example, in Java there are a lot of
> classes for file IO with only minor variations, whereas in .NET a smaller
> number of classes fill a similar role.

.Net emanated from J++ back when.

J++ got Microsoft slapped in court for violating Java trademark rules.

They rebranded it and changed certain things, improving them with some of the 
non-compliant enhancements they'd given J++, and more.

So the lineage is direct.

> there are also many cases where the classes have the same names, and many
> methods with the same names and arguments (although using FirstLetterCaps
> rather than camelCase, ...).

That is still camel case.

> but, there are many differences as well.

"If I have seen farther than other men, it is because I have stood on the 
shoulders of giants."
- Sir Isaac Newton

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

[toc] | [prev] | [next] | [standalone]


#15021

FromBGB <cr88192@hotmail.com>
Date2012-06-03 15:42 -0500
Message-ID<jqgibp$4e8$1@news.albasani.net>
In reply to#15019
On 6/3/2012 2:13 PM, Lew wrote:
> BGB wrote:
>> Arne Vajhøj wrote:
>>> If you with VB means VB.NET then you are absolutely correct.
>>>
>>> VB.NET is C# with VB syntax and C# is close to a superset of Java.
>>>
>>
>> generally, yes.
>>
>> but, a person could try to argue that they are "totally different", say
>> because of using "namespace" and "using" rather than "package" and
>> "import",
>> and ":" in class definitions instead of "extends" and "implements", ...
>>
>> however, these are likely minor differences (many are primarily
>> cosmetic, and
>> some others could conceivably be made to work on the JVM as well).
>
> "namespace" and "using" are significantly different from 'package' and
> 'import' in semantics.
>

well, hence the comment "some others could be made to work on the JVM":
unlike the differences in class syntax, "namespace" and "using" also 
differ some in terms of how they work, so would be a little harder to 
fit onto the JVM as it exists, but could probably be done via a little 
compiler trickery.

the main difference would likely be the potential loss of a 1:1 mapping 
between source-files and output class files.


I am not really intending to argue here about how similar or different 
"namespace" and "using" are from "package" and "import" though.


>>> And the .NET library is also rather close to the Java library.
>>>
>>> Anders Hejlsberg worked on MS Java before he started working
>>> on .NET and C#.
>>
>> yeah, pretty much.
>>
>> there is a lot of overlap, although to me it looks like in some cases
>> things
>> were simplified and merged vs Java, for example, in Java there are a
>> lot of
>> classes for file IO with only minor variations, whereas in .NET a smaller
>> number of classes fill a similar role.
>
> .Net emanated from J++ back when.
>
> J++ got Microsoft slapped in court for violating Java trademark rules.
>
> They rebranded it and changed certain things, improving them with some
> of the non-compliant enhancements they'd given J++, and more.
>
> So the lineage is direct.
>

pretty much.

in many places, there are similarities, but also a lot of differences.


>> there are also many cases where the classes have the same names, and many
>> methods with the same names and arguments (although using FirstLetterCaps
>> rather than camelCase, ...).
>
> That is still camel case.
>

fair enough.


>> but, there are many differences as well.
>
> "If I have seen farther than other men, it is because I have stood on
> the shoulders of giants."
> - Sir Isaac Newton
>

yep.

[toc] | [prev] | [next] | [standalone]


#15022

FromLew <noone@lewscanon.com>
Date2012-06-03 14:23 -0700
Message-ID<jqgkkv$9m3$1@news.albasani.net>
In reply to#15021
On 06/03/2012 01:42 PM, BGB wrote:
> On 6/3/2012 2:13 PM, Lew wrote:
>> BGB wrote:
>>> Arne Vajhøj wrote:
>>>> If you with VB means VB.NET then you are absolutely correct.
>>>>
>>>> VB.NET is C# with VB syntax and C# is close to a superset of Java.
>>>
>>> generally, yes.
>>>
>>> but, a person could try to argue that they are "totally different", say
>>> because of using "namespace" and "using" rather than "package" and
>>> "import",
>>> and ":" in class definitions instead of "extends" and "implements", ...
>>>
>>> however, these are likely minor differences (many are primarily
>>> cosmetic, and
>>> some others could conceivably be made to work on the JVM as well).
>>
>> "namespace" and "using" are significantly different from 'package' and
>> 'import' in semantics.
>>
>
> well, hence the comment "some others could be made to work on the JVM":
> unlike the differences in class syntax, "namespace" and "using" also differ
> some in terms of how they work, so would be a little harder to fit onto the
> JVM as it exists, but could probably be done via a little compiler trickery.
>
> the main difference would likely be the potential loss of a 1:1 mapping
> between source-files and output class files.

You cannot lose what doesn't exist to start with. Source files in the usual 
Java implementation (i.e., one that uses files) have a 1-to-many relationship 
with classes (and therefore with class files in file-based implementations). 
This applies for both nested classes and top-level classes. (In a certain very 
loose sense, an inner class exists separately for each instance of its 
containing class.)

> I am not really intending to argue here about how similar or different
> "namespace" and "using" are from "package" and "import" though.

There's no room for argument. They are exactly as similar and different as 
they are. The degree of similarity and difference is objectively verifiable, 
as the terms are publicly and transparently defined.

I took exception to your characterization of the differences between keywords 
"namespace" and 'package' and between "using" (the statement, not the 
directive) and 'import' as "likely minor". Definitions of "minor" vary, but in 
my world, "nearly completely different" is not minor. (To be fair, the C# 
"using" directive is rather similar to the Java 'import', but the "using" 
statement is quite different. The "using" statement is similar to Java's new 
try-with-resources.)

There is no doubt that "namespace" and "using" could be made to work on the 
JVM, for a language that uses those constructs. Java might move in the 
"namespace" direction itself with the proposed module semantics. As for 
"using", I don't see that coming to Java soon, but maybe. It might even be 
part of modules, too; I haven't read up on those yet. (I don't see anything 
recent coming out of this effort.)

<http://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html>
<http://openjdk.java.net/projects/modules/>

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

[toc] | [prev] | [next] | [standalone]


#15023

FromLew <noone@lewscanon.com>
Date2012-06-03 14:25 -0700
Message-ID<jqgko8$9m3$2@news.albasani.net>
In reply to#15022
  Lew wrote:

> As for "using", I don't see that coming to Java soon,

Oops. As a matter of fact, I see it coming to Java in the past.

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

[toc] | [prev] | [next] | [standalone]


#15074

FromBGB <cr88192@hotmail.com>
Date2012-06-05 09:22 -0500
Message-ID<jql4sa$4ee$1@news.albasani.net>
In reply to#15022
On 6/3/2012 4:23 PM, Lew wrote:
> On 06/03/2012 01:42 PM, BGB wrote:
>> On 6/3/2012 2:13 PM, Lew wrote:
>>> BGB wrote:
>>>> Arne Vajhøj wrote:
>>>>> If you with VB means VB.NET then you are absolutely correct.
>>>>>
>>>>> VB.NET is C# with VB syntax and C# is close to a superset of Java.
>>>>
>>>> generally, yes.
>>>>
>>>> but, a person could try to argue that they are "totally different", say
>>>> because of using "namespace" and "using" rather than "package" and
>>>> "import",
>>>> and ":" in class definitions instead of "extends" and "implements", ...
>>>>
>>>> however, these are likely minor differences (many are primarily
>>>> cosmetic, and
>>>> some others could conceivably be made to work on the JVM as well).
>>>
>>> "namespace" and "using" are significantly different from 'package' and
>>> 'import' in semantics.
>>>
>>
>> well, hence the comment "some others could be made to work on the JVM":
>> unlike the differences in class syntax, "namespace" and "using" also
>> differ
>> some in terms of how they work, so would be a little harder to fit
>> onto the
>> JVM as it exists, but could probably be done via a little compiler
>> trickery.
>>
>> the main difference would likely be the potential loss of a 1:1 mapping
>> between source-files and output class files.
>
> You cannot lose what doesn't exist to start with. Source files in the
> usual Java implementation (i.e., one that uses files) have a 1-to-many
> relationship with classes (and therefore with class files in file-based
> implementations). This applies for both nested classes and top-level
> classes. (In a certain very loose sense, an inner class exists
> separately for each instance of its containing class.)
>

fair enough.

what I meant was more like:
you have Java source file in a given path with a given base name;
it is compiled;
it results in a class file in the same path with the same base name 
representing the contained class (except in cases where there may also 
be additional output files).

if the language were using a different structure, then the compiler 
output would more often be in different paths with different names from 
the source files.


>> I am not really intending to argue here about how similar or different
>> "namespace" and "using" are from "package" and "import" though.
>
> There's no room for argument. They are exactly as similar and different
> as they are. The degree of similarity and difference is objectively
> verifiable, as the terms are publicly and transparently defined.
>
> I took exception to your characterization of the differences between
> keywords "namespace" and 'package' and between "using" (the statement,
> not the directive) and 'import' as "likely minor". Definitions of
> "minor" vary, but in my world, "nearly completely different" is not
> minor. (To be fair, the C# "using" directive is rather similar to the
> Java 'import', but the "using" statement is quite different. The "using"
> statement is similar to Java's new try-with-resources.)
>

I was never talking about:
"using(object)" or similar.
yes, this is "almost completely different" from import.


I meant solely the "using", as in:
namespace foo {
	using bar;
	...
}

where, functionally:
package foo;
import bar.*;

is at least vaguely similar to the above (apart from their relations to 
compiler and loader behavior, ...).


> There is no doubt that "namespace" and "using" could be made to work on
> the JVM, for a language that uses those constructs. Java might move in
> the "namespace" direction itself with the proposed module semantics. As
> for "using", I don't see that coming to Java soon, but maybe. It might
> even be part of modules, too; I haven't read up on those yet. (I don't
> see anything recent coming out of this effort.)
>
> <http://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html>
>
> <http://openjdk.java.net/projects/modules/>
>

dunno really...

would have to look into it all a bit more to be more certain.
(quick skim of "modules", seems like it is dealing with an altogether 
different problem).


but, there is ActionScript3 which does things like this:
package foo.bar {
	import baz;
	...
}

so, it is sort of like a hybrid...

[toc] | [prev] | [next] | [standalone]


#15077

FromLew <lewbloch@gmail.com>
Date2012-06-05 09:54 -0700
Message-ID<e30fcac6-414f-47aa-a0c0-0c3bc8f4bb30@googlegroups.com>
In reply to#15074
BGB wrote:
> Lew wrote:
>> BGB wrote:
>>> the main difference would likely be the potential loss of a 1:1 mapping
>>> between source-files and output class files.
>>
>> You cannot lose what doesn't exist to start with. Source files in the
>> usual Java implementation (i.e., one that uses files) have a 1-to-many
>> relationship with classes (and therefore with class files in file-based
>> implementations). This applies for both nested classes and top-level
>> classes. (In a certain very loose sense, an inner class exists
>> separately for each instance of its containing class.)
>>
> 
> fair enough.
> 
> what I meant was more like:
> you have Java source file in a given path with a given base name;
> it is compiled;
> it results in a class file in the same path with the same base name 
> representing the contained class (except in cases where there may also 
> be additional output files).
> 
> if the language were using a different structure, then the compiler 

Well, that's not actually part of the Java language. It exists only in current file-
based implementations of it like the Reference Implementation.

There is nothing in the Java Language Specification that requires that file-
based scheme, or any file-based scheme. Read the introduction of Chapter 7. 
It's barely mentioned, only to say that Java bytecode can live in files or databases, 
and that tools might require some conventions.

I suspect if we find a way to store bytecode in other than files or databases 
that the stewards of Java wouldn't blink.

> output would more often be in different paths with different names from 
> the source files.

That's not an aspect of other languages, either, but of their tools.

Regardless, in Java there is no requirement that file names match class 
names, nor even that files be used at all.

>>> I am not really intending to argue here about how similar or different
>>> "namespace" and "using" are from "package" and "import" though.
>>
>> There's no room for argument. They are exactly as similar and different
>> as they are. The degree of similarity and difference is objectively
>> verifiable, as the terms are publicly and transparently defined.
>>
>> I took exception to your characterization of the differences between
>> keywords "namespace" and 'package' and between "using" (the statement,
>> not the directive) and 'import' as "likely minor". Definitions of
>> "minor" vary, but in my world, "nearly completely different" is not
>> minor. (To be fair, the C# "using" directive is rather similar to the
>> Java 'import', but the "using" statement is quite different. The "using"
>> statement is similar to Java's new try-with-resources.)
>>
> 
> I was never talking about:
> "using(object)" or similar.

Fair enough.

> yes, this is "almost completely different" from import.
> 
> 
> I meant solely the "using", as in:
> namespace foo {
> 	using bar;
> 	...
> }
> 
> where, functionally:
> package foo;
> import bar.*;
> 
> is at least vaguely similar to the above (apart from their relations to 
> compiler and loader behavior, ...).

True.

>> There is no doubt that "namespace" and "using" could be made to work on
>> the JVM, for a language that uses those constructs. Java might move in
>> the "namespace" direction itself with the proposed module semantics. As
>> for "using", I don't see that coming to Java soon, but maybe. It might
>> even be part of modules, too; I haven't read up on those yet. (I don't
>> see anything recent coming out of this effort.)
>>
>> <http://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html>
>>
>> <http://openjdk.java.net/projects/modules/>
>>
> 
> dunno really...
> 
> would have to look into it all a bit more to be more certain.
> (quick skim of "modules", seems like it is dealing with an altogether 
> different problem).
> 
> 
> but, there is ActionScript3 which does things like this:
> package foo.bar {
> 	import baz;
> 	...
> }
> 
> so, it is sort of like a hybrid...

The current Java ecosystem of packages, JARs, WARs and EARs 
works well enough, apparently, or the modules proposal would 
have shown some life in the last five or more years. They're 
saying it is in the hopper for Java 8, but they used to say it'd 
be in Java 7. Apparently demand hasn't been high enough to 
accelerate it.

-- 
Lew

[toc] | [prev] | [next] | [standalone]


#15348

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-06-16 23:34 -0400
Message-ID<4fdd504e$0$287$14726298@news.sunsite.dk>
In reply to#15019
On 6/3/2012 3:13 PM, Lew wrote:
> BGB wrote:
>> Arne Vajhøj wrote:
>>> If you with VB means VB.NET then you are absolutely correct.
>>>
>>> VB.NET is C# with VB syntax and C# is close to a superset of Java.
>>>
>>
>> generally, yes.
>>
>> but, a person could try to argue that they are "totally different", say
>> because of using "namespace" and "using" rather than "package" and
>> "import",
>> and ":" in class definitions instead of "extends" and "implements", ...
>>
>> however, these are likely minor differences (many are primarily
>> cosmetic, and
>> some others could conceivably be made to work on the JVM as well).
>
> "namespace" and "using" are significantly different from 'package' and
> 'import' in semantics.

I would consider them very similar.

What are the difference in semantics you think of?

>>> And the .NET library is also rather close to the Java library.
>>>
>>> Anders Hejlsberg worked on MS Java before he started working
>>> on .NET and C#.
>>
>> yeah, pretty much.
>>
>> there is a lot of overlap, although to me it looks like in some cases
>> things
>> were simplified and merged vs Java, for example, in Java there are a
>> lot of
>> classes for file IO with only minor variations, whereas in .NET a smaller
>> number of classes fill a similar role.
>
> .Net emanated from J++ back when.
>
> J++ got Microsoft slapped in court for violating Java trademark rules.
>
> They rebranded it and changed certain things, improving them with some
> of the non-compliant enhancements they'd given J++, and more.
>
> So the lineage is direct.

I don't think rebranded is accurate.

I don't think J++ and .NET share any code and should be considered
two very distinct projects.

But obviously a MS "Java" and a MS Java-like language like C#
must have shared some IP.

Arne


[toc] | [prev] | [next] | [standalone]


#15572

From"Mike Schilling" <mscottschilling@hotmail.com>
Date2012-06-24 17:02 -0700
Message-ID<js89pj$eg$1@dont-email.me>
In reply to#15348
"Arne Vajhøj" <arne@vajhoej.dk> wrote in message 
news:4fdd504e$0$287$14726298@news.sunsite.dk...
>>
>> They rebranded it and changed certain things, improving them with some
>> of the non-compliant enhancements they'd given J++, and more.
>>
>> So the lineage is direct.
>
> I don't think rebranded is accurate.
>
> I don't think J++ and .NET share any code and should be considered
> two very distinct projects.
>
> But obviously a MS "Java" and a MS Java-like language like C#
> must have shared some IP.

I think it's fair to say something like the following:

* The J++ extensions to Java (delegates, events) were on the list of .NET 
runtime features.
* J# was built on top of the .NET runtime, using ideas but probably little 
code from J++
* J# was intended as an upgrade path for J++ users, so some attention was 
paid to backward compatibility, but it wasn't completely compatible

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.java.programmer


csiph-web