HiAs some of us, I'm following the two lists (dev and beginner..) and there is a long interesting discusion about pragma, FFI, primitive... but I don't really know them ;) exept what I found on wikipedia lol
Can anyone indicate me pointers or maybe simple examples to understant that better ?in
Additionally, some primitives are optional, they are only used to
speed up lengthy computations. Like searching in a string or adding
large numbers (ever tried 1000 factorial ?). If the primitive is
not available, the Smalltalk code will be executed instead.
look at @
the point creation
really thanks Bert ;)clear explanation... I had dome vague ideas but thats far clearer now
A module is written in C (though often the C code is generated fromSqueak code) and needs to be compiled with a C compiler. Some modulesare linked into the VM, some are external. You can list all
look at @the point creation method is sped up using an optional primitive call.
@ yPrimitive. Answer a Point whose x value is the receiver and whose yvalue is the argument. Optional. No Lookup. See Object documentationwhatIsAPrimitive.primitive: 18
^Point x: self y: y(a) Time
2006/8/7, stéphane ducasse [EMAIL PROTECTED]:
Hi florentRead K. Beck idiom on redefining = normally you MUST also redefine hashthe pattern Kent suggested wasBook= anBook(self author = anBook author ) and: [self name = anBook name] (a)
Bookhashself author hash bitXor: selfname hash (b)I'm aware of
Exception handling should be used to capture exceptional situation
that are beyond the control of your application, such as permission
errors on files etc.
It should not be used to implement a particular control flow. For
example, you can use an exception to return out of a particular
cdrick wrote:
really interesting...
If I remember well I've seen Stephan saying that it's not always good
practises tu use exception handling ...
what are the limits ? when to use or when not to use ...
It seems appropriate to me when there is a user entry to control it and
avoid human
cdrick wrote:
ps: Considering pragma, is there any classical uses that can be
interesting to do to work at the meta level... like Id' like to tag
instance variables according to their meaning in my application. I have
no idea on how to use pragma for that...
Pragmas *may* only be implemented
Am 21.08.2006 um 15:59 schrieb cdrick:
euhh actually, I don't see any primitive call in
Integerfactorial , only a recursive function... did I miss
somrthing ?
No, #factorial is a regular method, but LargeInteger arithmetics is
accelerated by LargeIntegerPlugin. You could try
cdrick wrote:
Pragmas *may* only be implemented for methods. It seems to be the case
in Visual Works. Do you want an explanation for methods ?
yes if you can :)
Pragmas are annotations for your methods. This annotations allows the
developer to categorize its methods.
For
I can confirm that VisualWorks only implements pragmas for methods,
nothing else.
On 21 Aug 2006, at 18:33, Damien Cassou wrote:
cdrick wrote:
ps: Considering pragma, is there any classical uses that can be
interesting to do to work at the meta level... like Id' like to
tag instance
11 matches
Mail list logo