Call for Ruby, Python, Java, Javascript Guide to Pharo

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Call for Ruby, Python, Java, Javascript Guide to Pharo

Stephane Ducasse-3
Hi Dimitri

Preambule: If you want to understand why I react like to the other
thread: we are ***FIGHTING*** all day long to build a great system and
this is not easy and I do not need to know how great are the other
systems. If I want to know I can just drop Pharo and go coding in X.
No need to have such discussion on PharoDev where we should be
concentrated.

Now if you and other want to contribute actively to Pharo here is a simple idea.

Create one chapter (I will do the editing) similar to this one (you
can also modify this one) to explain to a Pythoner, Rubbyist,
Javascripter, the syntax and core libraries of Pharo.

https://github.com/SquareBracketAssociates/PharoInProgress/tree/master/JavaCppPharo

It was on my todo but I would have to refresh my mind on these languages.

Stef

Comparison.pdf (168K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Call for Ruby, Python, Java, Javascript Guide to Pharo

kilon.alios
Well we certainly have a different way of thinking, I cannot get emotional attached to languages to the level you are passionate about Pharo.

To me it’s important to have a general idea of languages and their capabilities as this helps me improve as a coder because obviously each language has its own priorities and as a result also a different style.

I started adding Python code to your chapter but will take me some time because I am about to release the commercial Python app I am working on so I don’t have the free time I used to.

Maybe it would have been better to make this in a table format to make it easier to read but that’s up to you.

Frankly I don’t think it would be important for a Python code to see the equivalent code because Smalltalk follow its own mind set while Python prioritizes familiarity and ease of learning.

For example in the math.sin() section you make the rightful claim that numbers are objects can be subclassed etc and hence 100 sin.

In Python it’s math.sin() but in Python 100 is also an object that can be subclassed. Because Python follows a similar design of everything being an object. So it is possible to have something like (100).sin(), if you subclassed Integer. Python hides its “Smalltalk ness” inside a very C like appearance to lower the learning curve. So it going to be a looooong comparison and I rather not go there.

The best advice I ever got when learning English, from a Greek teacher, was to never try to translate Greek to English inside my mind when I speak or write English. Instead to think in English directly.

I would give a Python coder learning Pharo the same advise. Forget anything you know about Python, learn Pharo from scratch step by step and with a lot of practice. Take a look at my videos you will see I never mention Python once or other language when I teach Pharo.

Comparing languages in a discussion about Pharo vs the rest is vastly different, at least to me , from teaching Pharo.
On Sun, 8 Oct 2017 at 11:34, Stephane Ducasse <[hidden email]> wrote:
Hi Dimitri

Preambule: If you want to understand why I react like to the other
thread: we are ***FIGHTING*** all day long to build a great system and
this is not easy and I do not need to know how great are the other
systems. If I want to know I can just drop Pharo and go coding in X.
No need to have such discussion on PharoDev where we should be
concentrated.

Now if you and other want to contribute actively to Pharo here is a simple idea.

Create one chapter (I will do the editing) similar to this one (you
can also modify this one) to explain to a Pythoner, Rubbyist,
Javascripter, the syntax and core libraries of Pharo.

https://github.com/SquareBracketAssociates/PharoInProgress/tree/master/JavaCppPharo

It was on my todo but I would have to refresh my mind on these languages.

Stef
Reply | Threaded
Open this post in threaded view
|

Re: Call for Ruby, Python, Java, Javascript Guide to Pharo

Peter Uhnák
Comparing languages in a discussion about Pharo vs the rest is vastly different, at least to me , from teaching Pharo.

The pdf that Stef posted I wrote for my students (which know Java and C), just so it is easier for them to compare/grasp the new syntax based on what they already know. It wasn't/isn't meant as a language comparison in the sense that one is better than the other.

Peter
Reply | Threaded
Open this post in threaded view
|

Re: Call for Ruby, Python, Java, Javascript Guide to Pharo

kilon.alios
Yes I know thats what I am saying , that I dont think its a good idea to learn like this a language.

In any case I am adding the Python code snippets and leave the teaching to you. It will take some time but will get it done, no big deal. 

On Sun, Oct 8, 2017 at 5:20 PM Peter Uhnák <[hidden email]> wrote:
Comparing languages in a discussion about Pharo vs the rest is vastly different, at least to me , from teaching Pharo.

The pdf that Stef posted I wrote for my students (which know Java and C), just so it is easier for them to compare/grasp the new syntax based on what they already know. It wasn't/isn't meant as a language comparison in the sense that one is better than the other.

Peter
Reply | Threaded
Open this post in threaded view
|

Re: Call for Ruby, Python, Java, Javascript Guide to Pharo

Ben Coman
In reply to this post by Stephane Ducasse-3
On Sun, Oct 8, 2017 at 10:19 PM, Peter Uhnák <[hidden email]> wrote:
Comparing languages in a discussion about Pharo vs the rest is vastly different, at least to me , from teaching Pharo.

The pdf that Stef posted I wrote for my students (which know Java and C), just so it is easier for them to compare/grasp the new syntax based on what they already know. It wasn't/isn't meant as a language comparison in the sense that one is better than the other.

btw, Have you seen "I Can Read C++ and Java But I Can’t Read Smalltalk" by Wilf LaLonde

I like the side-comments...
  t.rotate (a, v); //Original
  t rotate (a, v); //Who needs dot?
  t rotate a, v; //Who needs brackets?
  t rotate by: a around: v; //Who needs ambiguity?
  t rotateBy: a around: v //This is Smalltalk

cheers -ben 

Reply | Threaded
Open this post in threaded view
|

Re: Call for Ruby, Python, Java, Javascript Guide to Pharo

Sven Van Caekenberghe-2


> On 8 Oct 2017, at 23:41, Ben Coman <[hidden email]> wrote:
>
> On Sun, Oct 8, 2017 at 10:19 PM, Peter Uhnák <[hidden email]> wrote:
> Comparing languages in a discussion about Pharo vs the rest is vastly different, at least to me , from teaching Pharo.
>
> The pdf that Stef posted I wrote for my students (which know Java and C), just so it is easier for them to compare/grasp the new syntax based on what they already know. It wasn't/isn't meant as a language comparison in the sense that one is better than the other.
>
> btw, Have you seen "I Can Read C++ and Java But I Can’t Read Smalltalk" by Wilf LaLonde
> http://carfield.com.hk/document/languages/readingSmalltalk.pdf?

Interesting.

> I like the side-comments...
>   t.rotate (a, v); //Original
>   t rotate (a, v); //Who needs dot?
>   t rotate a, v; //Who needs brackets?
>   t rotate by: a around: v; //Who needs ambiguity?
>   t rotateBy: a around: v //This is Smalltalk

That's more like it !

> cheers -ben
>