<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="98564" data-post-id="98564">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="gon782" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  gon782
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Qqwy" data-post="10" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/qqwy/48/1349_2.png" class="avatar"> Qqwy:</div>
<blockquote>
<p>When comparing Haskell with OCaml I do want to point out for people that do not know, that OCaml is not pure (and AFAIK has no way to enforce purity), which might matter to you.</p>
</blockquote>
</aside>
<p>I’ll add that OCaml’s guiding light has never been ergonomics and you can feel it when you use it.</p>
<p>Tons of the features that make Haskell compilation slower (solved by using <code>ghcid</code>, by the way, for anyone who hasn’t used Haskell ever / in a long time) are there to make your development better. Even the simple things like free ordering of definitions, partial application of type constructors without extra libs, top-level pattern matching, etc.. It’s death by a thousand cuts even before you get to inevitably missing typeclasses and other big features.</p>
<p>As a general comment on a lot of things in threads like these that toss around “practical” and “pragmatic”:</p>
<p><a href="https://www.quora.com/Which-is-more-practical-Haskell-or-Rust-Will-Rust-overthrow-Haskell/answer/Tikhon-Jelvis" class="onebox" target="_blank" rel="noopener nofollow ugc">https://www.quora.com/Which-is-more-practical-Haskell-or-Rust-Will-Rust-overthrow-Haskell/answer/Tikhon-Jelvis</a></p>
<p>It’s an interesting sort of accepted way to argue in favor of less rigorous methods and languages. Some would argue that having more static verification is more practical and pragmatic, but these words are almost always used as “Well, those are not the bugs that happen in my code [read: that I remember]”. My reality looks a lot different. There’s very little that’s practical about not having more static guarantees and I miss it everywhere I don’t have it.</p>
<p>It’s a matter of degree too. When I saw what people could do with dependent types I wanted them immediately. So I tried Idris and just didn’t get how to use them. I later tried again and got just a little bit closer to getting it. I’m not “with it” enough to sit down and think in dependent types, but I definitely want to be and I definitely will be. Because it just adds more static guarantees, even on the value level (by proxy of being able to have the value level in the type level).</p>
<p>Let’s face it: Humans are the best at programming but still extremely bad at it. This puts us in the position that we pretty much have to do it, because even while we’re terrible at it we still don’t have good stand-ins that can take our place. Having the machines help us along the way seems the most sensible way forward to me.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="98564" data-batch-url="/posts/batch_likers">
                        11
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/the-complexity-of-haskell-vs-elixirs-simplicity/16366/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-98564" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="98564"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="98572" data-post-id="98572">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Qqwy" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Qqwy/120/1349_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Qqwy
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>TypeCheck Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/gon782" rel="nofollow">@gon782</a> I recently came across the following talk:</p><div class="youtube-onebox lazy-video-container" data-video-id="7NB8tMa8sUk" data-video-title="Real-world Haskell: Good, Bad, &amp; Ugly by Saurabh Nanda at Functional Conf 2017" data-video-start-time="" data-provider-name="youtube">
  <a href="https://www.youtube.com/watch?v=7NB8tMa8sUk" target="_blank" class="video-thumbnail" rel="noopener nofollow ugc">
    <img class="youtube-thumbnail" src="https://img.youtube.com/vi/7NB8tMa8sUk/maxresdefault.jpg" title="Real-world Haskell: Good, Bad, &amp; Ugly by Saurabh Nanda at Functional Conf 2017" width="690" height="388">
  </a>
</div>

<p>which was very interesting, since it brings up some important points about the Haskell development environment that could be improved;<br>
some quick examples being:</p>
<ul>
<li>The learning cliff.</li>
<li>There are too many libraries, so it is difficult to find <em>good</em>/maintained libraries that do what you want between the cruft.</li>
<li>The Haskell community is divided about a couple of core issues, such as if it is better to manage your dependencies (and even ‘how to install Haskell’) using Cabal or Stack.</li>
<li>Some libraries make odd choices of when to use partial functions, and when this inevitably <em>does</em> bring down your application, the error messages are extremely cryptic and there usually isn’t a stacktrace at all.<br>
Besides this, the talk also talks about web-development-specific things, where their team had issues changing their Rails-mindset to a Haskell one. (And even though it has been a year, in my personal opinion, some of that Rails mindset still shines through in what they attempt to do in Haskell, but most of their points are very valid and definitely interesting to hear).</li>
</ul>
<hr>
<p>I really like what you’ve written in your latest post, by the way. I couldn’t have said it better <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> .</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="98572" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/the-complexity-of-haskell-vs-elixirs-simplicity/16366/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-98572" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="98572"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="98577" data-post-id="98577">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="gon782" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  gon782
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Qqwy" data-post="13" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/qqwy/48/1349_2.png" class="avatar"> Qqwy:</div>
<blockquote>
<ul>
<li>The learning cliff.</li>
<li>There are too many libraries, so it is difficult to find <em>good</em> /maintained libraries that do what you want between the cruft.</li>
<li>The Haskell community is divided about a couple of core issues, such as if it is better to manage your dependencies (and even ‘how to install Haskell’) using Cabal or Stack.</li>
<li>Some libraries make odd choices of when to use partial functions, and when this inevitably <em>does</em> bring down your application, the error messages are extremely cryptic and there usually isn’t a stacktrace at all.<br>
Besides this, the talk also talks about web-development-specific things, where their team had issues changing their Rails-mindset to a Haskell one. (And even though it has been a year, in my personal opinion, some of that Rails mindset still shines through in what they attempt to do in Haskell, but most of their points are very valid and definitely interesting to hear).</li>
</ul>
</blockquote>
</aside>
<p>I like the talk and I can’t claim to have gone through the same thing as they have in terms of scale at all. DB stuff in particular I think is something I feel spoiled with in terms of Ecto.</p>
<p>While there are things I dislike about Haskell the language (records, etc.) they’re fairly few, because I think as a language there really isn’t a general purpose one that can rival it. The real issue is that I’ve always felt that I needed a Haskell mentor that could answer all of these peripheral questions (many of which are brought up in the talk). There’s only one other language I can think of where a mentor is essentially required because you have to really be one with the zeitgeist/community/current best choice and it’s C++.</p>
<p>I’ve found posts like this one really good:</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://lexi-lambda.github.io/blog/2018/02/10/an-opinionated-guide-to-haskell-in-2018/">
  <header class="source">

      <a href="https://lexi-lambda.github.io/blog/2018/02/10/an-opinionated-guide-to-haskell-in-2018/" target="_blank" rel="noopener nofollow ugc">lexi-lambda.github.io</a>
  </header>

  <article class="onebox-body">
    

<h3><a href="https://lexi-lambda.github.io/blog/2018/02/10/an-opinionated-guide-to-haskell-in-2018/" target="_blank" rel="noopener nofollow ugc">An opinionated guide to Haskell in 2018</a></h3>



  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>To some extent it’s about someone making a choice for you and letting you move forward and you trusting that that choice is good enough. In certain areas we might only have bad choices and that’s another issue, but often there will be a best choice somewhere and without someone to tell you you’re just fumbling in the dark.</p>
<p>One of the reasons I want a Haskell job is because I want a Haskell senior to tell me all of these things so that I, as a “Haskell for fun” user can unlock all of these secrets I imagine are out there. In contrast, I learned Elixir pretty much on my own and have managed to find my way into a very productive situation both in terms of output and financials (granted, this is really a function of the contact network I established from working with Erlang).</p>
<p>So yeah, I agree that there are issues, but they’re not usually about the language. That makes it almost infinitely more frustrating, because you know that they’re avoidable and solvable, yet they remain. The divide between <code>cabal</code> (+ nix…) and <code>stack</code> is perhaps the most obvious one because it hits you the moment you decide to start (and also come back if you’ve been away for a while). It has much bigger consequences than you’d imagine at first as well because there are things that plain just won’t work for one or the other.</p>
<p>Edit: A special note about the editor integration, etc.:</p>
<p>A while ago I stopped using HIE and went back to basics: I started using <strong>only</strong> <code>ghcid</code> (+ a separate <code>ghci</code> process) and <a href="https://www.youtube.com/watch?v=52VsgyexS8Q" rel="noopener nofollow ugc">Hole Driven Development</a> (this video shows basically zero initial knowledge with holes driving the implementation entirely, which you’d rarely actually do, though it shows the power of it as a guide and the experience of doing it, as mentioned in the video, is actually better now). The compiler can answer <strong>a lot</strong> of questions for you and the dev cycle you get with <code>ghcid</code> telling you stuff like this on save gets you extremely far.</p>
<p>If you feel like it, you can use <code>ghcid</code> together with editors to have them display the same information in-editor, but I’ve found that I just really never run <code>GhcidStart</code> in <code>neovim</code> anymore.</p>
<p>This becomes even better with <a href="https://www.youtube.com/watch?time_continue=1&amp;v=pDgshr-oc14" rel="noopener nofollow ugc">valid function suggestions for holes</a>, with which you’ll get actual suggestions for functions to use based on the type of the hole. This’ll increase the discoverability of library functions a lot and it’s something GHC provides on its own, so it’s usable from the most basic tooling.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="98577" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/the-complexity-of-haskell-vs-elixirs-simplicity/16366/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-98577" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="98577"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="98611" data-post-id="98611">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="OvermindDL1" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/OvermindDL1/120/2677_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  OvermindDL1
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Qqwy" data-post="10" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/qqwy/48/1349_2.png" class="avatar"> Qqwy:</div>
<blockquote>
<p>The problem with <code>number</code> is related that Elm pretends to have arbitrary-size integers but secretly still uses JS’s built-in numeric IEEE-like floats underneath. I would not call number a <code>typeclass</code> because it is not parametrized (it is still of kind <code>*</code> and not <code>* -&gt; *</code> or higher): A type cannot be both <code>number</code> as well as something else.</p>
</blockquote>
</aside>
<p>A type being able to fullfill interfaces is not part of typeclasses but rather part of witness collapsing (remember that typeclasses are just less powerful witnesses), which conceptually it’s like passing the same thing into multiple arguments of the different types, thus that can still be emulated in Elm.  <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="Qqwy" data-post="10" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/qqwy/48/1349_2.png" class="avatar"> Qqwy:</div>
<blockquote>
<p>But yeah, I am unsure what to call <code>number</code> if not typeclasses. My point was, in any case, that it was not possible to define your own typeclasses (nor instantiate them for your custom types), which mean that you need to maintain a large amount of boilerplate code manually.And yes, typeclasses are not a first-class feature, which means that you should not over-use them even in languages that have them, but they are still really expressive.</p>
</blockquote>
</aside>
<p>You ‘can’ still do witnesses in Elm, not as succinct as in other languages, but it is still entirely doable, so you can still get typeclass functionality, just with more writing.  <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="Qqwy" data-post="10" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/qqwy/48/1349_2.png" class="avatar"> Qqwy:</div>
<blockquote>
<p>Haskell’s protocols also need to haul around a vtable if you call a typeclass-function in a way that would mean that more than one instance would reach at the same time. Typeclasses are only able to work on ‘just types’ and be compiled away in a compiled language, and then only sometimes. The same is true for Rusts traits.</p>
</blockquote>
</aside>
<p>Yep, that vtable ‘is’ an incarnation of the global witness table, though optimally in a full witness system (the way OCaml does it) the global witness table would not exist and all calls would be statically known with no virtual lookups needed.  You can still ‘bake’ a global witness table in OCaml if absolutely necessary, both the module system or the object system can be used for that (or GADT’s if you know all types ahead of time).</p>
<aside class="quote no-group" data-username="Qqwy" data-post="10" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/qqwy/48/1349_2.png" class="avatar"> Qqwy:</div>
<blockquote>
<p>My point, comparing Elixir Protocols to Haskell Typeclasses, is that having a feature that somewhat looks like Typeclasses does not make your language devolve into a ‘recursively descending rabbit hole of complexity’ right away, but that it is rather a very expressive and widely-used and accepted feature of the language.</p>
</blockquote>
</aside>
<p>+1  I don’t get Elm’s reluctance to add exceedingly useful QoL things, it reminds me of Go, trying to be as low level as possible, which just makes both easy to use, but very very boring and hard to read and brittle (in logic).</p>
<aside class="quote no-group" data-username="Qqwy" data-post="10" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/qqwy/48/1349_2.png" class="avatar"> Qqwy:</div>
<blockquote>
<p>When comparing Haskell with OCaml I do want to point out for people that do not know, that OCaml is not pure (and AFAIK has no way to enforce purity), which might matter to you.</p>
</blockquote>
</aside>
<p>Indeed!  OCaml tries to be as pure as erlang, which is to say purity where it matters and dropping it (but safely) to let you get ‘real work done efficiently’.  <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="gon782" data-post="12" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>I’ll add that OCaml’s guiding light has never been ergonomics and you can feel it when you use it.</p>
</blockquote>
</aside>
<p>It’s designed to be unambiguous and easy to parse, of which it is, there are never any questions of what a construct is at any point, unlike haskell and elixir and so forth.</p>
<aside class="quote no-group" data-username="gon782" data-post="12" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>Even the simple things like free ordering of definitions,</p>
</blockquote>
</aside>
<p>OCaml supports this with interfaces fine, it’s just not default because OCaml rely’s on ordering of commands allowing for overriding the visibility of prior ones, thus allowing you to something like having a module extend another module and change and/or add functionality to it (or remove it), which is not something you can in Haskell, and this has fantastic boons for keeping code short and reuseable.</p>
<aside class="quote no-group" data-username="gon782" data-post="12" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>partial application of type constructors without extra libs</p>
</blockquote>
</aside>
<p>That’s because haskell generates functions for the heads, which pollutes the function namespace.   I prefer OCaml’s style of opt-in function generation by far, especially as I don’t use it most of the time (which means I can make head names be far more generic and readable).</p>
<aside class="quote no-group" data-username="gon782" data-post="12" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>top-level pattern matching</p>
</blockquote>
</aside>
<p>Uh, doesn’t OCaml have quite a lot of pattern matching?  A common test would be something like this (at the top level):</p>
<pre data-code-wrap="ocaml"><code class="lang-ocaml">let 4 = 2 + 2 (* Test that addition works as expect *)
</code></pre>
<p>You can even destructure, match, even include guards and all via the <code>match</code> or <code>function</code> calls:</p>
<pre data-code-wrap="ocaml"><code class="lang-ocaml">let blah = function
| 1 -&gt; "One"
| 2 -&gt; "Nope"
| x when x&lt;0 -&gt; "ACK!  Too low!  But I have a guard!"
| _ -&gt; "Higher positive"

(* match is identical syntax except you pass in the initial value like `match value with ...` *)
</code></pre>
<aside class="quote no-group quote-modified" data-username="gon782" data-post="12" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>etc… It’s death by a thousand cuts even before you get to inevitably missing typeclasses and other big features.</p>
</blockquote>
</aside>
<p>So I’m not seeing these, at all…  I find that I’m as productive in OCaml as I am in Python in terms of languages (and indeed even many libraries, except all type safe), and I definitely would not be able to say that about haskell.  I am curious where you got the above thoughts though as they seem to lack the reasoning on the other side as to ‘why’ those decisions where made (for example, OCaml doesn’t include typeclasses just because they don’t, but rather because it has a <em>significantly</em> more powerful capability that is slightly more verbose, but even the verbosity will vanish once a PR is finished up), or just outright wrong (like matching, a big thing about OCaml is destructuring matching with guards, ala Erlang/Elixir).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="98611" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/the-complexity-of-haskell-vs-elixirs-simplicity/16366/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-98611" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="98611"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="98614" data-post-id="98614">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="gon782" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  gon782
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="OvermindDL1" data-post="15" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>I am curious where you got the above thoughts though as they seem to lack the reasoning on the other side as to ‘why’ those decisions where made</p>
</blockquote>
</aside>
<p>No, I think I’m fairly certain why most of the QoL things that aren’t in ocaml are missing and I even gave one of those in the post.</p>
<aside class="quote no-group" data-username="OvermindDL1" data-post="15" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>rather because it has a <em>significantly</em> more powerful capability that is slightly more verbose, but even the verbosity will vanish once a PR is finished up),</p>
</blockquote>
</aside>
<p>You mean the thing that never ever ships, just like multicore? It’s the Duke Nuke’em of language features at this point.</p>
<p>I like ocaml and I understand what it’s doing, I’ve even praised the singular dedication they’ve shown in never implementing anything that doesn’t fit into those ideas, but it just isn’t as concerned with QoL as I’d like it to be.</p>
<p>About top-level pattern matching, it’s a nitpick but I’d just prefer split clauses with pattern matching right on the parameters. I didn’t use to but I just think it’s unnecessary to not have it at this point.</p>
<p>I’ll reiterate what I’ve said elsewhere: I think OCaml is about as much power as you can get with the least amount of tools, because when stuff is added it fits extremely well. I’d just rather they lowered the power-to-feature ratio in favor of comfort a bit. But it’s not in their philosophy to do that and that’s fine. We still use OCaml for some of our projects and I’m very happy about it because it beats Javascript by heaps.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="98614" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/the-complexity-of-haskell-vs-elixirs-simplicity/16366/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-98614" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="98614"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="98622" data-post-id="98622">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="OvermindDL1" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/OvermindDL1/120/2677_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  OvermindDL1
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="gon782" data-post="16" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>No, I think I’m fairly certain why most of the QoL things that aren’t in ocaml are missing and I even gave one of those in the post.</p>
</blockquote>
</aside>
<p>Except they aren’t missing.  OCaml has overriding in lieu of free ordering, or just use <code>and</code> instead of <code>let</code> at all top level definitions except the first, then you get free ordering, Haskell’s definitions are like they are in an implicit <code>and</code> chain without any way to break out.  OCaml doesn’t like to pollute the function namespace as it then makes ‘return’ type deduction not what one would expect, unlike what Haskell does (I.E. it is opt-in).  And OCaml very much has pattern matching that is near the power of erlang, I’m not actually sure that haskell even has the capability of guards on pattern matching?</p>
<aside class="quote no-group" data-username="gon782" data-post="16" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>You mean the thing that never ever ships, just like multicore? It’s the Duke Nuke’em of language features at this point.</p>
</blockquote>
</aside>
<p>Not in mainline but they are in branches.  Unlike Haskell that likes to break things on every-singly-version, OCaml actually takes backwards compatibility seriously, thus they don’t just immediately toss in everything that is handed them but rather test it extensively, including with existing code-bases to make sure no prior issues, and that it will properly cover all issues that it is intended to cover into the unbounded future, which is very much unlike Haskell that has 40 ways of doing things, 3 string types just in core alone, and kludge upon kludge upon kludge just to get it’s type system working.</p>
<aside class="quote no-group" data-username="gon782" data-post="16" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>but it just isn’t as concerned with QoL as I’d like it to be.</p>
</blockquote>
</aside>
<p>They are <em>very</em> concerned with QoL, not just with immediate usage but also with maintainability and for people to not worry that their code will just outright break on later versions, unlike Haskell.</p>
<aside class="quote no-group" data-username="gon782" data-post="16" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>About top-level pattern matching, it’s a nitpick but I’d just prefer split clauses with pattern matching right on the parameters. I didn’t use to but I just think it’s unnecessary to not have it at this point.</p>
</blockquote>
</aside>
<p>A PPX can change that, but that seems like a lot of needless verbosity when just a simple <code>|</code> indicates a new head on the same function, nicely readable and perfectly consistent with match expressions, unlike haskell that uses entirely different syntax between it’s function heads and <code>case</code>.</p>
<aside class="quote no-group" data-username="gon782" data-post="16" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>I’ll reiterate what I’ve said elsewhere: I think OCaml is about as much power as you can get with the least amount of tools, because when stuff is added it fits extremely well. I’d just rather they lowered the power-to-feature ratio in favor of comfort a bit. But it’s not in their philosophy to do that and that’s fine. We still use OCaml for some of our projects and I’m very happy about it because it beats Javascript by heaps.</p>
</blockquote>
</aside>
<p>I’m curious how it is considered ‘least amount of tools’.  Everything you can do with Functors and modules you can do via flat record packing/unpacking (and a whole <em>TON</em> more verbosity), you get the completely fluff row-typing via objects (which are just row-typed records), you have polymorphic variants (also entirely fluff on a normal more-verbose tag system), among a great deal more.  OCaml is designed for ease of use and ease of reading (where haskell often looks like line noise and runs slower to boot…).  No surprise slow lazy calls (instead it’s opt-in via <code>lazy</code>, thus only where you need it, instead Haskell is opt-out), it compiles <em>significantly</em> faster, has a single package manager system, doesn’t have an ambiguous syntax that relies on whitespace to try to disambiguate (and haskell still fails at times) that makes copying code actually sensible, has the ability to extend modules, etc… etc…</p>
<p>However yes, OCaml’s parallel work sucks, the python model is not acceptable, but then again OCaml usually replaces my Python work, it doesn’t replace my erlang/elixir or C++/Rust work.  Use the right language in the right place and all.  Haskell does have some cool concurrency models, but then again it is a move fast and break things language.  And it’s not like OCaml is standing still, the current work is focusing on getting windows to be a first-class citizen, which is no small undertaking.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="98622" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/the-complexity-of-haskell-vs-elixirs-simplicity/16366/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-98622" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="98622"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="98652" data-post-id="98652">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="gon782" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  gon782
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="OvermindDL1" data-post="17" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>And OCaml very much has pattern matching that is near the power of erlang, I’m not actually sure that haskell even has the capability of guards on pattern matching?</p>
</blockquote>
</aside>
<pre data-code-wrap="haskell"><code class="lang-haskell">f x | x &lt; 0     = -1
    | x == 0    = 0
    | otherwise = 1
</code></pre>
<p>It’s just that I also prefer, if ever so slightly, to be able to do this:</p>
<pre data-code-wrap="haskell"><code class="lang-haskell">update model (ServerMsg msg) = handleServerMessage model msg
update model (ClientMsg msg) = handleClientMessage model msg
</code></pre>
<p>instead of this</p>
<pre data-code-wrap="ocaml"><code class="lang-ocaml">let update model = function
  | Server_msg msg -&gt; handle_server_message model msg
  | Client_msg msg -&gt; handle_client_message model msg
</code></pre>
<aside class="quote no-group" data-username="OvermindDL1" data-post="17" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>Not in mainline but they are in branches. Unlike Haskell that likes to break things on every-singly-version, OCaml actually takes backwards compatibility seriously, thus they don’t just immediately toss in everything that is handed them</p>
</blockquote>
</aside>
<p>Much like the picture you’re painting is an exaggeration I’ll say at least Haskell got new features since the millenium. For real, though, I don’t really see where you’re going with this as breaking changes haven’t been something I’ve taken note of in Haskell. If you mean new language features changing things they’re exclusively in language extensions (which OCaml should probably adopt, by the way, so new features can actually enter the language instead of languishing in repositories for 4+ years).</p>
<p>Modular implicits have been coming Soon™ for like 2-3 years. If ergonomics/QoL was a serious priority they’d have been out long ago, but I guess the safest way to ensure no breakage is to literally never actually release the feature.</p>
<aside class="quote no-group" data-username="OvermindDL1" data-post="17" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>3 string types just in core alone</p>
</blockquote>
</aside>
<p><code>Text</code> &amp; <code>ByteString</code> aren’t in core, they’re just packages. That’s either worse or better depending on who you ask, I suppose. If you were to say it’s confusing for newbies, yeah, it’s currently what half of this thread is about at the moment, but luckily these have “best practices” now. If it’s text, just use <code>Text</code>, if it’s binary data that’s not meant to be treated as text, just use <code>ByteString</code>.</p>
<aside class="quote no-group quote-modified" data-username="OvermindDL1" data-post="17" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>OCaml is designed for ease of use…</p>
</blockquote>
</aside>
<p>… once the compiler has gotten its pound of flesh and something has absolutely no performance hit whatsoever?</p>
<p>Jokes aside I’m not even saying OCaml is somehow much worse than every other language. All things considered it’s probably in my top 5 languages, maybe even top 3. It’s just that you inevitably feel like you’ve gone back in time for a bit, in my opinion.</p>
<p>All in all I just can’t really agree with you that it seems they’ve ever really considered ergonomics and putting the programmer first in almost any choice. I love the features they have put in, but at some point it must’ve been like obviously useful things like ad-hoc polymorphism just weren’t prioritized highly enough. At this rate Haskell will likely implement dependent types before modular implicits are released for OCaml. That’s all work done by, as far as I know, one person and that’s to take the language into the future, not just catch up.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="98652" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/the-complexity-of-haskell-vs-elixirs-simplicity/16366/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-98652" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="98652"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="98660" data-post-id="98660">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="OvermindDL1" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/OvermindDL1/120/2677_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  OvermindDL1
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="gon782" data-post="18" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>It’s just that I also prefer, if ever so slightly, to be able to do this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">update model (ServerMsg msg) = handleServerMessage model msg
update model (ClientMsg msg) = handleClientMessage model msg
</code></pre>
<p>instead of this</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">let update model = function
  | Server_msg msg -&gt; handle_server_message model msg
  | Client_msg msg -&gt; handle_client_message model msg
</code></pre>
</blockquote>
</aside>
<p>I actually prefer the latter, even putting a case inside a def in elixir at times, it makes it obvious they all belong together, heads of the same function, unlike the above and normal elixir/erlang styles where you can’t always tell they are the same head without mentally parsing the name and arguments of the function itself.  I.E. it makes it contextually obvious without needing to do mental work, which is a huge boon when scanning through code quickly.  <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="gon782" data-post="18" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>Much like the picture you’re painting is an exaggeration I’ll say at least Haskell got new features since the millenium. For real, though, I don’t really see where you’re going with this as breaking changes haven’t been something I’ve taken note of in Haskell. If you mean new language features changing things they’re exclusively in language extensions (which OCaml should probably adopt, by the way, so new features can actually enter the language instead of languishing in repositories for 4+ years).</p>
</blockquote>
</aside>
<p>OCaml core is pretty easy about taking in new features as long as there is sufficient tests done, pretty stringent on that.  In Haskell I’m speaking more of old code breaking, not new features.</p>
<aside class="quote no-group" data-username="gon782" data-post="18" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>Modular implicits have been coming Soon™ for like 2-3 years. If ergonomics/QoL was a serious priority they’d have been out long ago, but I guess the safest way to ensure no breakage is to literally never actually release the feature.</p>
</blockquote>
</aside>
<p>Modular implicits are a fairly small thing overall, they save you from typing a single word each on a witness patterned function call, not a huge boon, though a nice QoL mostly on witness based operators (I tend to go for piping though).</p>
<aside class="quote no-group" data-username="gon782" data-post="18" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>It’s just that you inevitably feel like you’ve gone back in time for a bit, in my opinion.</p>
</blockquote>
</aside>
<p>Most of my Haskell work ended ~5 years ago, so I havn’t kept up much after that except the occasional compiling and updating/fixing of something that broke from new versions of ghc.  Still though it’s massive amount of type extensions hasn’t gotten any better by far, nor its compiling speed (still rivals that of C++, especially templatees when HKT’s are used in Haskell).</p>
<aside class="quote no-group" data-username="gon782" data-post="18" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>At this rate Haskell will likely implement dependent types before modular implicits are released for OCaml.</p>
</blockquote>
</aside>
<p>Ooo?  They have an actual setup for dependent types coming out?  I’d actually like to read on that a bit.  I’ve tried implementing dependent typing a few times in languages I’ve made but all the corner cases start driving me crazy and idris is not quite mentally parseable… ^.^;</p>
<p>Overall though, I still prefer languages that are slow on taking in features when the features are well designed.  Take C++, I waited <em>12</em> years for C++11 to come out just to give me something as trivial as <code>auto</code>, even though I could 90% of the way there with template magic and certain design patterns, <code>auto</code> was just so trivial for the compiler as it already had that information, but it still took 12 years to get it.  OCaml seems like it moves <em>very</em> fast to me compared to what I’m used to.  ^.^;</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="98660" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/the-complexity-of-haskell-vs-elixirs-simplicity/16366/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-98660" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="98660"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="98670" data-post-id="98670">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="gon782" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  gon782
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="OvermindDL1" data-post="19" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>Ooo? They have an actual setup for dependent types coming out? I’d actually like to read on that a bit. I’ve tried implementing dependent typing a few times in languages I’ve made but all the corner cases start driving me crazy and idris is not quite mentally parseable… ^.^;</p>
</blockquote>
</aside>
<p>There’s been a lot of progress and from the latest status update I think Richard Eisenberg said that he’s hopeful for actual dependent types in GHC in 2019, but there’s no telling if I’m up to date on that at all.</p>
<p>You can do the basics right now, essentially:</p>
<p><a href="https://www.schoolofhaskell.com/user/konn/prove-your-haskell-for-great-safety/dependent-types-in-haskell" class="onebox" target="_blank" rel="noopener nofollow ugc">https://www.schoolofhaskell.com/user/konn/prove-your-haskell-for-great-safety/dependent-types-in-haskell</a></p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://www.parsonsmatt.org/2017/04/26/basic_type_level_programming_in_haskell.html">
  <header class="source">

      <a href="https://www.parsonsmatt.org/2017/04/26/basic_type_level_programming_in_haskell.html" target="_blank" rel="noopener nofollow ugc">parsonsmatt.org</a>
  </header>

  <article class="onebox-body">
    

<h3><a href="https://www.parsonsmatt.org/2017/04/26/basic_type_level_programming_in_haskell.html" target="_blank" rel="noopener nofollow ugc">Basic Type Level Programming in Haskell</a></h3>

  <p>Dependently typed programming is becoming all the rage these days.Advocates are talking about all the neat stuff you can do by putting more and more informat...</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<aside class="quote no-group" data-username="OvermindDL1" data-post="19" data-topic="16366">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>Overall though, I still prefer languages that are slow on taking in features when the features are well designed. Take C++, I waited <em>12</em> years for C++11 to come out just to give me something as trivial as <code>auto</code> , even though I could 90% of the way there with template magic and certain design patterns, <code>auto</code> was just so trivial for the compiler as it already had that information, but it still took 12 years to get it. OCaml seems like it moves <em>very</em> fast to me compared to what I’m used to. ^.^;</p>
</blockquote>
</aside>
<p>Yeah, fair point. Everything is relative.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="98670" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/the-complexity-of-haskell-vs-elixirs-simplicity/16366/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-98670" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="98670"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #19"></div>
  </section>
</div>
    <div class="postbit" id="104917" data-post-id="104917">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="xnukernpoll" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  xnukernpoll
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>It’s a matter of where the complexity is placed.</p>
<p>In the case of Elixir the language itself and the tooling is dead simple, but the runtime and ecosystem of BEAM is very complex, and there’s a lot of compile time complexity.</p>
<p>Ocaml has a very small runtime and is dead easy to parse, In terms of code reusability if you abuse the sh*t out of functors even though it’s not all that great appearance wise and adds a lot of complexity compared to say type classes to the application developer, MLI files make code reviews and documentation easy.</p>
<p>As for it’s concurrency story, honestly its story there shouldn’t be compared to Python, like Lwt + libevent or uwt is actually more performant than NodeJS, and nobody talks about Node’s GIL.</p>
<p>I’m going to use the aformentioned excuses that the the Python people do but honestly I just find it hypocritical because nobody says this about Node.</p>
<p>Honestly the main case where Ocaml is actually as bad as people think in a multicore world, is like when you have a shared state bottleneck  where you’re using a mutex and there are a lot of writes that actually take a long time to do, and Node is in the same boat.</p>
<p>If we’re talking C10K it’s on par with node and when it comes to data parallel stuff, using fork it’s comparable to Go.</p>
<p>Don’t even get me started on how great Mirage is in a parallel world, since like you’re just spawning a bajillion tiny unikernels that only use the resources it needs.</p>
<p>is just a PITA because you are constantly reinventing the wheel and like there isn’t a lot of documentation in the cooler projects, like you’re expected to just mess around with it and read the MLI files and maybe send a message on the forum or email the maintainer.</p>
<p>Multicore is usab<br>
TL;DR: Elixir is simpler le now for the most part apart from a handful of backwards compatability bugs, that have improved rapidly, like the only thing that holds back widespread use is lack of documentation, the fact that it’s targeted towards people who know how to and really want to implement schedulers.</p>
<p>Modular Implicits can be used it just hasn’t been integrated as part of the main version of the language, mostly because the community is like screw that I’ll just use ppx rewriters for the time saving parts, or I’ll use the record system, or first class modules to imitate x aspect of typeclasses I want, and honestly prefer the modularity over the conveniences of type classes.</p>
<p>Ocaml’s problem isn’t a lack of performance or language features, the community is dominated by less than a 100 systems hackers or compiler nerds, who don’t mind reinventing the wheel, its weakness is the lack of empathy to normal application programmers who don’t want to read a lot of code they aren’t writing,  contribute to a handful of open source projects, and have their GitHub full of tiny libraries that maybe 10 people use, and implement a truckload of common algorithms .</p>
<p>Erlang has a similar story but like it makes things so very easy to build cool ****.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="104917" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/the-complexity-of-haskell-vs-elixirs-simplicity/16366/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-104917" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="104917"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #20"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/16366/load_more?page=3">Load more posts (15 remaining)</a>
</div></template></turbo-stream>