[squeak-dev] Re: talk on Newspeak online

Igor Stasenko siguctua at gmail.com
Thu May 8 19:58:42 UTC 2008


2008/5/8 Klaus D. Witzel <klaus.witzel at cobss.com>:
> On Thu, 08 May 2008 14:06:09 +0200, Igor Stasenko wrote:
>
>> 2008/5/8 Klaus D. Witzel wrote:
>>>
>>> On Thu, 08 May 2008 12:30:54 +0200, Igor Stasenko wrote:
>>>
>>> > And borrowing crappy concept from crappy language produces crap.
>>> > Crap, despite how good it looks like outside (syntax sugar) still
>>> > stays crap inside. ;)
>>> >
>>>
>>>  We'll see what *crap* you will produce (when Newspeak is released) when
>>> you're asked to then show solutions (in then existing Newspeak code) for
>>>
>>>  o every class can be mixed in [modulo slot name collision]
>>>  o modules are containers with high degree of isolation
>>>  o no extra code to make *something* a module
>>>  o subclassing guarantees proper initialized subinstances
>>>
>>>  Can we stick with "redundant" instead of "crap" for the moment? ;)
>>>
>>
>> Is it just only because *crap* is rude word or because it not
>> precisely characterizing problems? ;)
>
> Both, of course; you know me by now ;) The third is [OT] your new role
> (being on the board ;)
>

I trying to be constructive here. I not throwing a words that
*something* is stinks just because i don't like the *thing*,
i providing arguments and explanations why i think its err.. crappy :)
Oh, and i didn't used this word before Vassili started. Well, if
people want to defend their position more aggressively, i answer in
same style. But this not means that my point is not constructive
however.
Please do not take my comments as personal attack or ranting, i just
trying to put arguments and discuss why some things i think having
flaws.

>>>
>>> > Does anyone finds following pattern as bad style of programming? :
>>> >
>>>
>>>  Yes, me ;) I dislike your constants (strings and class names as well). I
>>> know you can do better ;) Also, you must change your method once you have
>>> one more platform (or after one is renamed to Microhoo ;) I prefer
>>> production systems that can be changed without compiling existing methods
>>> (for example, when foo is temporarily not supported but Mac can do part
>>> of
>>> its job for a while).
>>>
>>> > MyExternalModule>>new
>>> >   Smalltalk platformName = 'Windoze' ifTrue: [ ^ MyWin32ExternalModule
>>> > new
>>> ].
>>> >   Smalltalk platformName = 'Mac' ifTrue: [ ^ MyMacExternalModule new ].
>>> >   Smalltalk platformName = 'foo' ifTrue: [ ^ MyfooExternalModule new ].
>>> > self error: 'Unsupported platform'.
>>> >
>>>
>>>  MyExternalModule>>#newFor: platName
>>>  (Symbol hasInterned: platName ifTrue: [:sym | sel := sym])
>>>   ifFalse: [self error: '*unknown* platform name'].
>>>  subclass := self platsSupported at: sel ifAbsent: [self error:
>>> '*unsupported* platform name'].
>>>  ^ subclass new
>>
>> In fact, this code snippet belongs to VMMaker, not mine. ;)
>>
>> I would write it with a single line (true ST way of doing things):
>>
>> MyExternalModule class>>new
>>  ^ ( self allSubclasses detect: [:class | class supportsPlatform:
>> Smalltalk platformName ] ifNone: [ self error: 'unsupported platform'
>> ] ) new
>
> Ahh, I knew you know how :) But, by the joy offered from implicit-self
> message sends (statement-initial identifiers *are* sent :) one could also
> keep your (VMMaker's) style 1:1 in Newspeak. It's Smalltalk -anyways- even
> when I say I dislike it [the style of your method example].
>
> [OT] is the snippet in Slang? then there could be C-compilation-reason for
> the style.
>
Can't parse your last phrase. Please elaborate.

>> Hmm, what is the purpose of language feature then if it need to be
>> circumvented?
>
> Quick: what's the most circumvented language feature people use when
> smalltalking ;)
>
No idea. Put on desk the aces from you sleeve :)

>> Seems like people forget to use
>> http://en.wikipedia.org/wiki/Occam's_Razor principles :)
>>
>
> Nah. [OT] people tend to overuse (in the sense of over-cite) the razor
> principle, because its base is *plausible* *facts* which is only given when
> you *do*not* have plenty of choice (i.e. just choose between two). Otherwise
> the principle is synonym to lottery-principle ;)
>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list