> See Kernel-ct.1292/2 for the next attempt. :-)
Hi Marcel, Hi Chris,
thanks for your feedback. I see your point of complexity, still, I think BlockClosure #& etc. could be a nice concept, but it would rather belong in an own repository (such as Xtreams, for example).
See Kernel-ct.1292/2 for the next attempt. :-)
Am 09.10.2020 03:15:43 schrieb Chris Muller <asqueaker@gmail.com>:
Hi Christoph,
Are these equivalent --
On Thu, Jan 2, 2020 at 7:58 PM Thiede, Christoph <Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:
Outlook jumbled my message completely. Here the examples again:
[self model merge]
on: MCMergeResolutionRequest
& [:request | request merger conflicts notEmpty]
do: [:request | request resume: true].
equal to:
[self model merge]on: MCMergeResolutionRequestdo:[:request | request merger conflicts notEmptyifTrue: [request resume: true]ifFalse: [request pass] ]
?
[client unusedBytecode]
on: MessageNotUnderstood
& [:ex | ex receiver == client]
& [:ex | ex message selector == #unusedBytecode]
do: [self error: 'unusedBytecode'].
equal to
[client unusedBytecode]on: MessageNotUnderstooddo:[:ex | (ex receiver == client and: [ ex message selector == #unusedBytecode ])ifTrue: [ self error: 'unusedBytecode' ]ifFalse: [ ex pass ] ]
?
Not sure if I fully understood it, but is it just a reformat of the syntax? Or something more empowering?
references := [self resolvePackageSpecReferences: packageSpec gofer: gofer]
on: [self class retryPackageResolution] & (Error , GoferRepositoryError)
do: [:ex | retryCount >= 2 ifFalse: [
ex return: #() ]
on: [self class retryPackageResolution] & GoferRepositoryError.
Transcript showln: 'gofer repository error: '; show: ex description printString; show: '...ignoring'.
(repositoryError := ex) resume: #()].
(wait, is that, #on:do:on: ? I'm confused on this one...)
- Chris
sz := 1024*1024*1024*1024.
self
should: [Array new: sz]
raise: OutOfMemory, (Error & [:ex | ex messageText includesSubstring: 'basicNew: with invalid argument']).