[OT] Re: Proposal 2: Exceptions and @nogc

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 14 22:04:37 PDT 2017


On 15.04.2017 01:29, Walter Bright wrote:
> On 4/14/2017 3:41 PM, Timon Gehr wrote:
>> Haskell does not do that. Why do you think it does?
>
> Do what?

Require 100% purity and immutability. (You're underquoting.)

> I did not mention Haskell.
> ...

You said "come about when". Those things "came about" in Haskell.

This is the original monad paper (in an fp context): 
homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/baastad.pdf

(The paper mentions other programming languages in the intro, but it is 
easy to discover that this is just a courtesy/a way to establish relevance.)

This is the original FRP paper: http://conal.net/papers/icfp97/

>>> Back in the 80's, like everyone else, I went about creating a GUI user
>>> interface library. I discovered something interesting - what is
>>> orthogonal and consistent to a computer is anything but when dealing
>>> with people. What people view as orthogonal and consistent is a rat's
>>> nest of exceptions in the code to implement it. This is what makes a
>>> user interface library fiendishly difficult to pull off.
>>> ...
>>
>> Would you mind sharing an example?
>
> It was 30 years ago. I don't remember specifics, but I can think of one
> - the tab key. It means different things depending on what box you're
> in.

Inserting a tab character vs. moving to the next box?

> Some more thoughts - is a box in a fixed position, or is it movable?
> Is a box user-resizeable or not? Is the size of a box determined by its
> content do do you throw up scroll bars? or maybe relay out the contents?
> How do fonts affect this? How about screen resolution? Which parts of a
> box should be selectable with cut operations and which not? It just goes
> on and on.
> ...

I see. Maybe that is why I dislike using GUIs so much. :)

> There's the famous Windows 'start' button which you click on to turn the
> computer off. Of course, it is consistent from a programming point of
> view, because it starts the shutdown program.
>
> In any case, look at English. It is not remotely consistent, and drives
> programmers to fits trying to parse it. But people find it intuitive.
>

People get used to convoluted behaviours especially when in large 
groups. Synthetic languages are a great deal more orthogonal and 
consistent, because this is actually useful. I don't buy that aiming for 
inconsistencies is a way to make a system more intuitive when the user 
didn't have prior exposure to a similar system. Monads being unpopular 
has no bearing on whether the proposed feature is intuitive. (It isn't. 
There is a lot of precedent for a lack of explicit monads, but none for 
the proposal.)


More information about the Digitalmars-d mailing list