Check the FileSystem-Core-Implementation package and ask them to do the
Guides and Visitors in Java.

Their number of lines should be a couple of times more than these.



Or check the Pharo 3’s



*         PharoClassInstaller>>migrateClasses: old to: new using:
anInstanceModification

*         SlotClassBuilder



Yeah, sure, doing that in Java… doable. But what a deep pain where you can
for sure figure out.



Phil



From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Sergi Reyner
Sent: mardi 25 mars 2014 13:17
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Java "this" against our "thisContext"



2014-03-25 10:50 GMT+00:00 Panu Suominen <panu.suomi...@iki.fi
<mailto:panu.suomi...@iki.fi> >:

What do you mean operates at higher level?



It´s probably a slightly poor choice of words :)



What I mean by operating at a higher level is that, whereas:



thisContext instVarNamed: #receiver put: 42



is a single message send to an object, this:



Field a = sun.misc.VM.class.getDeclaredField("directMemory");

a.setAccessible(true);

a.get(null);



somehow makes me think about accessing internals that I shouldn´t care
about. I´m not sure of what the Java code does, as far as I can tell the
intention was to show me how you can access 'this' in Java. It doesn´t look
very object-oriented to me, but I can´t produce a "formal" explanation of
why.



Most things are much harder to do in Java than in Smalltalk but I don't know
if the level differs so much. For example method substitution is not so
standard VM feature in Java.



Maybe it wasn´t the right choice of words. I accept suggestions of
alternatives :)





Cheers,

Sergi



---
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce 
que la protection avast! Antivirus est active.
http://www.avast.com

Reply via email to