
The Soft Side of Software - k4rtik
http://queue.acm.org/detail.cfm?id=3092954
======
lindbergh
Erik Meijer a very engaging person! If I recall correctly, he spearheaded the
Linq project for C# back in mid-2000s.

In particular, I suggest his Haskell lectures to anyone interesting by
theoretical aspects of functional programming.
[https://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-
Fun...](https://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-
Programming-Fundamentals/Lecture-Series-Erik-Meijer-Functional-Programming-
Fundamentals-Chapter-1)

~~~
chubot
I just read over "Confessions of a used programming language salesman" [1]
again.

I didn't quite get it the first time around, but now I get it. Good read. It
is about the road from research to production, culminating in LINQ.

[1]
[https://scholar.google.com/scholar?cluster=17368623574878046...](https://scholar.google.com/scholar?cluster=17368623574878046313&hl=en&as_sdt=0,5&sciodt=0,5)

------
riwsky
In case people were wondering, the haskell stdlib answer to his interview
question is at
[https://hackage.haskell.org/package/transformers-0.5.2.0/doc...](https://hackage.haskell.org/package/transformers-0.5.2.0/docs/src/Control.Monad.Trans.Cont.html#ContT)
(ContT is a generalized form which lets people run, for example, computations
that involve IO). Though explaining it is still the fun part.

------
zengid
I know it's easy (and fun) to hate on Microsoft, but damn do they employ some
great engineers/researchers: Erik Meijer, Anders Hejlsberg, Simon Peyton
Jones, etc..

~~~
interfixus
Hejlsberg did amazing work on Turbo Pascal/Delphi, which were basically his
personal inventions. He then crossed over, and got himself lost in the C#/.net
universe - technology some of us wouldn't touch with the proverbial ten foot
pole, or one of any length, for that matter.

Considering that his (and my) compatriots Stroustrup and Lerdorf did C++ and
PHP repsectively, a national apology might sort of be in order.

~~~
ktRolster
He also did solid work in the C#/.net world.

~~~
interfixus
Yes, I know. I just hugely preferred his earlier work.

------
zengid
Can anyone help me interpret the type signature Meijer used in his programming
question? "Given a generic type:

    
    
        Cont r a = (a -> r) -> r
    

Prove that this type forms a monad."

I'm reading it as 'Container' passed 'r' and 'a' performs 'a' to 'r' which
returns 'r'. (I'm guessing on verbs here)..

I've never come across a good way to read these type signatures.

~~~
wz1000
Cont stands for Continuation. A continuation basically represents a
'suspended' computation with an intermediate result of type 'a' and final
result of type 'r'

    
    
        type Cont r a = (a -> r) -> r
    

Cont is a type constructor that takes two type arguments, r and a. This means
that Cont r a can always be substituted by (a -> r) -> r. For example, Cont
String Int is equivalent to (Int -> String) -> String

(a -> r) is the type of a function from a to r. For example, Int -> Bool is
the type of a function from Int to Bool. (a -> r) -> r is the type of a
function that takes a function from (a -> r) as its argument and returns an r.
So Cont String Int takes a function from Int to String as its argument and
finally returns a String.

[http://www.haskellforall.com/2012/12/the-continuation-
monad....](http://www.haskellforall.com/2012/12/the-continuation-monad.html)
[https://begriffs.com/posts/2015-06-03-haskell-
continuations....](https://begriffs.com/posts/2015-06-03-haskell-
continuations.html)

~~~
PopsiclePete
My eyes glazed over as they usually do when trying to grok Haskell, but is
that somehow related to partial computation and partial functions?

~~~
theoh
Not really to do with partial evaluation or the unrelated idea of a partial
function.

A key motivating (non-Haskell) example behind continuations is the idea of
replacing "return" with a function call. This is continuation passing style,
and obviously when you call a subroutine in CPS, you need to give it a
function to call when it completes: a "continuation" which is contrived to be
equivalent to what would happen when that particular subroutine "returned" in
normal direct style

------
tempodox
> ... prove that this type forms a monad.

How do I “prove” a type forms a monad? I only have to implement `lift` and
`bind` with the correct behavior, and I have a monadic interface. Did I prove
then that the type forms a monad?

~~~
MarisaKirisame
Assuming "correct behavior" mean no bottom, and follow monad law, yes.

------
gumby
While I agree with this point:

> Good developers understand that they can't do everything, and they know how
> to leverage tools as prosthetics for their brains.

it can also become a distracting fetish.

