eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

196
active users

#rescript

0 posts0 participants0 posts today
Diegovsky<p>I don't really understand why use <a href="https://fosstodon.org/tags/rescript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rescript</span></a>: some features like ADTs, pipes, records and a sane type system are fantastic! However I'm really offput by float operators and the need to constantly refer to the Class for methods:</p><p>Rescript:<br>```<br>let result = [1, 2, 3]<br> -&gt;Array.map(a =&gt; a + 1)<br> -&gt;Array.filter(a =&gt; mod(a, 2) == 0)<br>```</p><p>Js:<br>```<br>let result = [1, 2, 3]<br> .map(a =&gt; a + 1)<br> .filter(a =&gt; mod(a, 2) == 0)</p><p>```</p><p>Yeah you can be a functional purist but this code is just wordier for no reason</p>
Diegovsky<p>I don't really understand why some <a href="https://fosstodon.org/tags/programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programming</span></a> languages decide to add a completely different set of operators just for floats.</p><p>Like this: +. -. *. /.</p><p>why? the logic to type check whether both sides are float is so easy.</p><p>This is just a dumb decision in my view. Please prove me wrong.</p><p><a href="https://fosstodon.org/tags/rescript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rescript</span></a> <a href="https://fosstodon.org/tags/ocaml" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ocaml</span></a></p>