[squeak-dev] Renaming "Squeak"

John Thornborrow john at pinesoft.co.uk
Tue May 20 10:28:36 UTC 2008


Why not just implement your own #asDictionary message on 
SequencableCollection, if it's that much of an issue?

asDictionary
	"Answer a Dictionary with receivers elements.
	Assumes all elements are associations"
	| dict |
	dict := Dictionary new.
	self do: [:each | dict add: each].
	^dict

That will do what you're asking.

John.

Jason Johnson wrote:
> On Wed, Mar 5, 2008 at 10:23 PM, David Mitchell
> <david.mitchell at gmail.com> wrote:
>>  Brace notation for dynamic arrays!
> 
> So instead of:
> 
> dictionary := { $a -> 1. $b -> 2. $c -> 3 } asDictionary.
> 
> I need to type:
> 
> dictionary := Dictionary new
>                        add: $a -> 1;
>                        add: $b -> 2;
>                        add: $c -> 3;
>                        yourself.
> 
> ?  In my opinion the other dialects should adopt this or propose
> another way of doing it.  No concise syntax for dynamically creating a
> collection seems a problem to me, and easy to remedy in a language
> where one has access to the reader/compiler.  So why would it be bad
> to do so?
> 
> 
> 
>  
> 

-- 
John Thornborrow
http://www.pinesoft.co.uk


******************************************************************************************************************************************
This email is from Pinesoft Limited. Its contents are confidential to the intended recipient(s) at the email address(es) to which it has been addressed. It may not be disclosed to or used by anyone other than the addressee(s), nor may it be copied in anyway. If received in error, please contact the sender, then delete it from your system. Although this email and attachments are believed to be free of virus, or any other defect which might affect any computer or IT system into which they are received and opened, it is the responsibility of the recipient to ensure that they are virus free and no responsibility is accepted by Pinesoft for any loss or damage arising in any way from receipt or use thereof. *******************************************************************************************************************************************


Pinesoft Limited are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA



More information about the Squeak-dev mailing list