> On 06 Jul 2015, at 15:16, Kjell Godo <[email protected]> wrote:
> 
> Thank you for the detailed reply Andreas
> 
> 
> 
> Are there any Smalltalk packages implementing 
> 
> Category Theory based
> 
> functional programming constructs 
> 
> for function composition like
> 
> functors , applicatives , monads , arrows , etc ?
> 
> 
> 
> Do people have opinions about whether or not 
> 
> these plus immutable data structures would be good for managing state
> 
> in Smalltalk like they do it in Haskell etc?  i know that monads are not built
> 
> into Haskell but are implemented as addons via Haskell packages.
> 
> My Haskell friend said all you need to do functional programming is
> 
> first class functions
> 
> which Smalltalk Block contexts almost are except they lack their own stack?
> 
> if you wrap a Block in a Function Object do you then get the stack
> 
> effect so you can essentially call the Block recursively?

The following article:

  Lambda Calculus in Pharo
  Yes, the Y Combinator is useful in normal programs
  https://medium.com/concerning-pharo/lambda-calculus-in-pharo-a4a571869594

touches on some of the options in this area, answering some of your questions.

TL;DR - Pharo blocks are real lambdas/closures.

> i have been wondering about taking a crack at implementing these
> 
> in Smalltalk and i wonder if it would be 
> 
> theoretically possible 
> 
> to speed them up by inlining them via the Smalltalk compiler
> 
> 
> Thank you
> 
> 
> 
> On Saturday, November 8, 2014, Andreas Wacknitz <[email protected]> wrote:
> 
>> Am 07.11.2014 um 16:51 schrieb Kjell Godo <[email protected]>:
>> 
>> This is off topic.
>> 
>> I tried to post it as a top level thread but I have become unknown.
> Why do you expect that? Many people here are using Smalltalk for years.
> Just because you have been silent for some time doesn’t mean everybody will 
> forget about you :)
> 
>> 
>> I don't know if you want this crap in here but I have decided not to wait 
>> for the
>> 
>> postmaster to get back to me on the subject of becoming known.  Feel free.
>> 
>> 
>> 
>> 
>> 
>> ( Original-SUBJECT:     "( picoVerse-:( what about state , is state really 
>> evil? ) )"       )
>> 
>> 
>> 
>> 
>> 
>> 
>> I am a Smalltalker.
>> 
>> But in the past few months i have been running with the Haskellers.
>> 
>> The Haskellers hate state.
>> 
>> This seemed strange at first because as a Smalltalker i love(d) state.  
>> State iswas my friend.
>> 
>> 90% of my life as a Smalltalker is state wrangling.  I am a state herder.  
>> 
>> The debugger is my staff I use to whack the state.  And TestCase is my sheep 
>> dog.
>> 
>> But to the Haskellers
>> 
>> state is
>> 
>> the evil trinity 
>> 
>> of
>> 
>> satan the anti christ and the false prophet
>> 
>> all rolled into one.
>> 
>> State is the true dev incarnation of the total catastrophe of development 
>> Armageddon.
>> 
>> Blood up to the bridles for hundreds of miles.  Dogs and cats living 
>> together.  Mass hysteria.
>> 
>> They say.
>> 
>> I'm not sure i quite get it yet but they keep preaching on this one point 
>> most of all.
>> 
>> State is evil.
>> 
>> You must keep all state in a Monad.  As many methods/functions m as possible
>> 
>> must be 100% dependent on the input parameters ONLY.   
>> 
>> No hidden instance variables affecting the return value of m are allowed.
>> 
>> The only effect m can have is to return a value.
>> 
>> If all this is true then m is pure.   
>> 
>> And pure is good.   Pure is very good.  And the wind says
>> 
>> very.
>> 
>> So i wonder if any of you fellow
>> 
>> Smalltalkers
>> 
>> have thought about this at all.
> First, there are no good definitions of what is an object oriented language 
> and what is a functional language.
> Thus, languages like C++, C#, Java are being considered object oriented. But 
> their object orientation is not the same like Smalltalk’s.
> The same problem exists in the functional language world: Some consider LISP 
> being functional, some deny that.
> 
> Second, for some years I am constantly seeking for „the best“ language to 
> solve my problems in. Alas I wasn’t successful yet and don’t expect
> to be successful in the future. Every programming paradigm has its strengths 
> and weaknesses when it comes to real world problems.
> So in my eyes it is best to know the different programming paradigms and its 
> representative languages in order to be able to choose the
> best fitting language for your problem at hand.
> 
> Third, there have been many attempts to create multi-paradigm languages (like 
> C++, C#, Java, Scala, …). The idea behind is simple: combine
> the best characteristics. In my eyes all of them failed because what always 
> have been created is Frankenstein’s monster. When you combine
> paradigms you will may get some advantages of all but sure you will get a lot 
> of additional complexity.
> 
> Fourth, it has been said many times before: What makes Smalltalk so nice is 
> not only the language. It’s the whole system: the language, duck typing,
> the image (object world), the tools, the VM, the simplicity, the elegance, … 
> And last but not least the communities around.
> 
> Regards
> Andreas
> 
> PS: If you are interested in functional programming and don’t like static 
> typing you should have a look at Clojure. It has some nice ideas about
> how to deal with state concurrently.
> 
> 
> 
>> Thanks
>> 
>> Kjell E Godø
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> (((((((((( Maybe Smalltalk should be called Statewalk
>> 
>> as in yak it up fuzz ball. ))))))))))
>> 
> 


Reply via email to