help! [please]

R

Robert

Where can i find a free web- based VC++ course? (also i've to dowanload it)

I'm interested also in VB and C++

thanks, Robert
 
P

Phlip

Robert said:
Do you think that Ruby will have the success of VB?

Define "success".

Ruby has a huge, rabid community of users, pushing technology like Gem,
Rails, and YAML that VB users can only dream of, despite VB's corporate
backing.

However, Ruby will never be marketed as relentlessly and nauseatingly as a
Disney teen starlet...
 
I

Ioannis Vranos

Phlip said:
Define "success".

Ruby has a huge, rabid community of users, pushing technology like Gem,
Rails, and YAML that VB users can only dream of, despite VB's corporate
backing.

However, Ruby will never be marketed as relentlessly and nauseatingly as a
Disney teen starlet...


What is the benefit for Ruby being interpreted? Also does "scripting" imply that it is for
special purposes?
 
I

Ioannis Vranos

Ioannis said:
What is the benefit for Ruby being interpreted? Also does "scripting"
imply that it is for special purposes?


Also what exactly is dynamic typing? Something like

int i= 1;

string s= i.ToString();
 
V

Victor Bazarov

Ioannis said:
Also what exactly is dynamic typing? Something like

int i= 1;

string s= i.ToString();

Could we please discuss <someotherlanguage> elsewhere? Please?
 
P

Phlip

Ioannis said:
What is the benefit for Ruby being interpreted?

That allows Matz to add features to Ruby without slowing down to figure out
how to compile them to machine opcodes.
Also does "scripting" imply that it is for
special purposes?

That means it has a few tweaks (such as no main()), that make writing little
tiny extremely useful programs very easy.

Put another way, any special purpose you can think of...
Also what exactly is dynamic typing? Something like

int i= 1;

string s= i.ToString();

That is "weak typing". Perl does that. Don't get me started.

C++ is weakly, statically typed. (The weakness comes from issues like void*
or bool, not from automagic string conversion.)

Ruby, like Smalltalk, Pascal, or Python, is strongly typed. Unlike Pascal,
and like the others, it is dynamically typed.

In C++, static typing means this:

void Foo(Bar &);

That function Foo() will only accept objects whose type is known at compile
time to inherit from Bar. Foo() can only call methods known to exist in Bar
or higher, but not lower. Methods bind at runtime, but types bind at compile
time.

In a dynamic typing system, all objects inherit from a magic thing called
Object. So, in Ruby...

def Foo(aBar)
aBar.baz()
end

At compile time, all the compiler did was hash 'baz'. At runtime, aBar.baz()
uses Object's magic methods to fetch the target method, by hash. This magic
trades just a little execution overhead for a lot of cognitive freedom. We
can control exactly how typed Foo() is. We can assert that it only take Bar
objects, or we can leave it free to take anything that has a baz().

Further, in Ruby everything is an object, including classes. So you can pass
a class, by name, into a method. This is what C++ tries to give us with
templates. But C++ refuses to change C's type system beyond our simple
vtable, so C++ cannot truly treat classes as objects, and each instance of a
template is a different entity.
 
I

Ioannis Vranos

Phlip said:
That is "weak typing". Perl does that. Don't get me started.

C++ is weakly, statically typed. (The weakness comes from issues like void*
or bool, not from automagic string conversion.)

Ruby, like Smalltalk, Pascal, or Python, is strongly typed. Unlike Pascal,
and like the others, it is dynamically typed.

In C++, static typing means this:

void Foo(Bar &);

That function Foo() will only accept objects whose type is known at compile
time to inherit from Bar. Foo() can only call methods known to exist in Bar
or higher, but not lower. Methods bind at runtime, but types bind at compile
time.


ISO C++ has run-time type identification and it provides virtual methods, but the latest
is not for built-in types. But it provides templates for generic programming. I am not
comparing languages, since such a comparison would be unfair for Ruby in terms for
paradigm support and run-time/space efficiency, but Ruby is OK for non-demanding
applications I suppose.



In a dynamic typing system, all objects inherit from a magic thing called
Object. So, in Ruby...

def Foo(aBar)
aBar.baz()
end


OK, however this method for generic programming is a bit outdated. This is what .NET does
so far. Upcoming .NET 2 maintains this, however it introduces *run-time* generics for
generic programming (which are very limited BTW in comparison to compile-time templates,
but are still better than inheriting all objects from Object - .NET inherits everything
from Object too).

http://msdn.microsoft.com/library/d...us/cpref/html/frlrfsystemobjectclasstopic.asp


I think a good suggestion to Matz would be to proceed in this way too. It is cleaner.


At compile time, all the compiler did was hash 'baz'. At runtime, aBar.baz()
uses Object's magic methods to fetch the target method, by hash.


OK, .NET doesn't use hashing for this as far as I know, but virtual methods.


This magic
trades just a little execution overhead for a lot of cognitive freedom. We
can control exactly how typed Foo() is. We can assert that it only take Bar
objects, or we can leave it free to take anything that has a baz().

Further, in Ruby everything is an object, including classes. So you can pass
a class, by name, into a method. This is what C++ tries to give us with
templates. But C++ refuses to change C's type system beyond our simple
vtable, so C++ cannot truly treat classes as objects, and each instance of a
template is a different entity.


I am not sure treating classes as objects having any real benefits. Yes in C++ one can use
templates to pass various types (actually to create function instances for the type),
which I think is sufficient (and vtables are not used in this template approach).


I suppose that Ruby provides types as objects and stuff, because it has not the
run-time/space efficiency concerns that C++ has. Which is not bad for application
programming in nowadays PCs, they just have different design ideals, and thus it is not
fair to compare them on such things, but we can compare them on terms of paradigm coverage
(in OO for example whether everything provided in UML can be modelled in each language).
Under this view, in OO paradigm Ruby looks like not supporting many things, complete
multiple inheritance, comes to mind first.

Also from generic programming it supports the Object base approach and I suppose it uses
some type of reflection as .NET 1.x does, to determine which exact type an object belongs
to. This is a somewhat improved approach to the void * generic programming that C uses.

(in C if you want to write a generic function you write one that accepts a void * and an
additional parameter that helps you determine the exact type).


I am not trying to enforce C++ for everything, however I am demanding and pass any
language under scrutiny (for my chosen language ideals of course). :) So far two other
languages have gained my interest.

Objective-C and Ada. However both of them do not support my platform so far (Ada has a
..NET implementation, however no one could tell me how to set it up and run). So my
considerations are primarily my platform and second provide the ability for compilation.
An interesting message about another language that I sent in another thread.


[The name of the creator of Python was corrected to Guido van Rossum in a subsequent
mailing of the newsletter]


From WinInfo Daily Update:


Python Expands To IronPython

You might have heard of Python, a popular and powerful cross-
platform open-source programming language. Python, which is the
creation of Jim Hugunin, is described as "an interpreted, interactive,
object-oriented programming language ... often compared to Java, Perl,
Scheme, or Tcl." The basic description says a lot (for more information
about Python, see the URL below). Even behemoths such as Google rely
heavily on Python to develop their solutions. Microsoft has also
recently gotten into the act.
http://list.windowsitpro.com/t?ctl=6431:275FF
Last year, Hugunin decide to expand on Python by creating IronPython
(see the first URL below), a new implementation that works within the
Microsoft .NET Framework and the cross-platform Mono environment, which
Novell sponsors (see the second URL below). Version 0.6 was released to
the public in July, when Hugunin also announced that he was joining
Microsoft to continue working on IronPython's evolution. Last week
(some 8 months after Hugunin joined the company), Microsoft released
IronPython pre-alpha version 0.7 to the public. Incidentally, Microsoft
stresses on its download page that IronPython is a codename, so
undoubtedly the company plans to come up with another name for the
final release.
http://list.windowsitpro.com/t?ctl=6430:275FF
http://list.windowsitpro.com/t?ctl=642F:275FF
IronPython is faster than the original Python and lets programmers
handle diverse sets of styles, interfaces, and subsystems. You can also
use the language to communicate with hardware and to develop the same
functionality as programs written in other languages--but with far
fewer lines of code. With IronPython, you can also produce static
runtime executables (.exe files) and DLLs.
The main thrust of IronPython seems to be that it supports
Microsoft's Common Language Runtime (CLR) environment (see the first
URL below), which allows seamless integration of code written in
numerous languages, such as C++, C#, Java, and Visual Basic (VB). If
you want a flexible cross-platform language, be sure to check out
Python, and if you're developing for .NET Framework, you should
certainly check out IronPython 0.7 (see the second URL below).
IronPython also has a message board, documentation, and a bug-tracking
facility (see the third URL below) and a mailing list you can join (see
the fourth URL below), although Hugunin implied in a message to the
list that it might eventually be closed in favor of the message board.
http://list.windowsitpro.com/t?ctl=642A:275FF
http://list.windowsitpro.com/t?ctl=6423:275FF
http://list.windowsitpro.com/t?ctl=6426:275FF
http://list.windowsitpro.com/t?ctl=6427:275FF
 
P

Phlip

Ioannis said:
I am not sure treating classes as objects having any real benefits.

The Prototype Pattern is built into each class, for free.
Yes in C++ one can use
templates to pass various types (actually to create function instances for the type),
which I think is sufficient (and vtables are not used in this template
approach).

You are looking too narrowly at each detail of my post. The big picture:
Dynamic typing is orthogonal to execution efficiency, and it provides better
cognitive efficiency. So do block closures, continuations, reflection, and
interpreted evaluation.

The last one means the function eval() can run a string of Ruby, and that
string can see local and global variables, and can change an part of their
context. You can eval() a string that changes or adds a method to Object,
for example.
...when Hugunin also announced that he was joining
Microsoft to continue working on IronPython's evolution.

I thought Microsoft forbade open source projects. (Except like WTL...)
 
I

Ioannis Vranos

Phlip said:
the type),


approach).

You are looking too narrowly at each detail of my post. The big picture:
Dynamic typing is orthogonal to execution efficiency, and it provides better
cognitive efficiency. So do block closures, continuations, reflection, and
interpreted evaluation.

The last one means the function eval() can run a string of Ruby, and that
string can see local and global variables, and can change an part of their
context. You can eval() a string that changes or adds a method to Object,
for example.




I thought Microsoft forbade open source projects. (Except like WTL...)


Actually I have read that they are thinking of opening the source of .NET 2, however they
have not reached a decision, since they provide the Rotor source (Rotor is an experimental
Microsoft CLI VM for Windows XP, FreeBSD, and Mac OS X 10.2.

http://www.microsoft.com/downloads/...FA-7462-47D0-8E56-8DD34C6292F0&displaylang=en

http://www.ondotnet.com/pub/a/dotnet/2002/03/27/archtour.html


I think they have started to appreciate source code availability, under "shared source".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Please help me!!! 3
Hello and Help please :-) 1
Help please 8
Code help please 4
Please help 7
Menu issues - please help me 0
Malicious Coding Help Please 5
Html validation help, please 5

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,663
Latest member
josh5959

Latest Threads

Top