--- Begin Message ---
+1000
I'm with you 110% on this one!
Who, in their right mind, would code like that? Is it a trend among
younger Smalltalkers while dinosaurs like me just "naturally" still use
the "old way" and blocks? And do we have statistics about how often that
"syntax" is used in the current image? In the past, I've complained a
gazillion times about portability between Pharo and other Smalltalks
and/or legacy code so you pretty much know my position on this kind of
semantic twist! Okay, one might argue that using a symbol instead of a
Block in your example saves you a big 16 characters to type. But who
spends all their day mostly iterating over a collection so that it
becomes an issue to save 16 characters ??? And then, once we open that
door, what's next?
aCol do: [:eachItem | eachItem calculateProvincialTax. eachItem
calculateFederalTax. eachItem calculateRebates. eachItem calculateTotal]
Then, are we going to end up with "keystroke-savers" like:
aCol do: #calculateProvincialTax and: #calculateFederalTax and:
#calculateRebates and: calculateTotal
Yeah, polymorphism is cool. But "coolness" has never been a reason in
itself alone to use cool features just because they do exist!
</rant>
;)
On 2020-01-21 15:10, ducasse wrote:
Hi
I’m fed up. Why?
Because I see lousy code in Pharo and that such lousy code in Pharo is slower,
and sure that writing a type inferencer
for pharo will be more complex, and probably will make sista more complex too.
I asked the pharo consortium to take a clear position because I want a better
Pharo not the inverse.
So what is it.
You can write in your code but not in Pharo.
aCol do: #store
in Pharo we should write
aCol do: [ :each | each store ]
Block argument should be blocks else any static analyser will have to check it
is a block, it is a symbol, is
it a RANDOM object that answer value.
Seriously can be not make the life of people doing program analysis simpler?
So now if I’m wrong then I will shut up and I’m really pissed that we do that
without paying attention
to the consequence.
I asked the consortium to take position and to take action.
We should have a better code review for REAL.
S.
--
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero". (A. Einstein)
--- End Message ---