Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > eerie Java-BASIC (partially OT)

Reply
Thread Tools

eerie Java-BASIC (partially OT)

 
 
Stefan Ram
Guest
Posts: n/a
 
      06-02-2012
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.

 
Reply With Quote
 
 
 
 
Arne Vajhøj
Guest
Posts: n/a
 
      06-02-2012
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


 
Reply With Quote
 
 
 
 
Arne Vajhøj
Guest
Posts: n/a
 
      06-02-2012
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

 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      06-02-2012
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/wikipedi.../c/cf/Friz.jpg
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      06-03-2012
On Sat, 02 Jun 2012 09:41:00 -0700, Lew <> 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
..
 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      06-03-2012
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
 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      06-03-2012
On 6/3/2012 3:44 AM, Roedy Green wrote:
> On Sat, 02 Jun 2012 09:41:00 -0700, Lew<> 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

 
Reply With Quote
 
BGB
Guest
Posts: n/a
 
      06-03-2012
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.

 
Reply With Quote
 
BGB
Guest
Posts: n/a
 
      06-03-2012
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", ...

 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      06-03-2012
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/wikipedi.../c/cf/Friz.jpg
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call for Entries! EERIE HORROR FILM FESTIVAL! Baron Von Kropp DVD Video 0 12-29-2005 08:56 PM



Advertisments
 



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 47 48 49 50 51 52 53 54 55 56 57