<p dir="ltr">If/when Applicative Do drops, would using 'return' force monad semantics on a do-block that could otherwise be applicative? That's the only thing that comes to mind. Otherwise yeah, I've been using 'pure' exclusively for a while.</p>
<div class="gmail_quote">On May 14, 2016 2:54 PM, "David Thomas" <<a href="mailto:davidleothomas@gmail.com">davidleothomas@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As I understand it, that's correct - you can use pure anywhere you'd<br>
have used return.<br>
<br>
On Sat, May 14, 2016 at 2:39 PM, Silent Leaf <<a href="mailto:silent.leaf0@gmail.com">silent.leaf0@gmail.com</a>> wrote:<br>
> All in the title; Since the change in GHC, 7.10 i think, where all Monad<br>
> instances had to have Applicative instances too, in theory all monads must<br>
> have a pure method that should be identical to return, right?<br>
><br>
> My subjectively superficial reason for preferring pure (and caring about the<br>
> issue in the first place) is twofold: shorter (i know, i know, still the<br>
> shorter, the quicker to read and then understand in the code) and, mostly,<br>
> less semantically-awkward --honestly the name "stains" the functional<br>
> semantics in Monadic code, in my opinion, but that's just personal. (For<br>
> those who know, it feels like the "new" operator in JS (OO<br>
> class-instanciation semantical imitation))<br>
><br>
> Of course now I'm perfectly used to, have no trouble seeing it for what it<br>
> is all the time, not mixing it up with some imperative-like "return"<br>
> concept.<br>
> Yet i don't really like it much at all, so I wanted to know to which extent<br>
> it is safe to always use pure even in explicitly Monadic contexts.<br>
><br>
> Thankx in advance!<br>
> _______________________________________________<br>
> Beginners mailing list<br>
> <a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
><br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div>