タグ付けされた質問 「language-design」

1
交差点タイプと共用体タイプの実際的な問題は何ですか?
学習体験として、静的に型付けされた単純な関数型プログラミング言語を設計しています。 私がこれまでに実装した型システムは、(少し余分な作業を行うことで)交差型と共用体型を組み込むことができるようです。 <Union String Integer> <Union Integer Foo> 上記の2つのタイプの共通部分はプレーンです Integer 2つのタイプの結合は次のようになります <Union String Integer Foo> もちろん、これが可能であるという事実は、必ずしもそれが優れたデザインアイデアであることを意味するわけではありません。特に、型をばらばらにしたり、重複を処理したりすることの実装の難しさを少し心配しています。 このような機能を型システムに組み込むことの長所と短所は何ですか?

5
計算可能な数が有理数か整数かをテストすることはできますか?
計算可能な数が有理数か整数かをアルゴリズムでテストすることはできますか?言い換えれば、それは道具計算数字は機能を提供するために、そのライブラリは可能でしょうisIntegerかisRational? 私はそれが不可能であると推測し、これは何らかの形で2つの数値が等しいかどうかをテストすることができないという事実に関連していると推測していますが、それを証明する方法はわかりません。 編集:計算数はxxxの関数で与えられるfx(ϵ)fx(ϵ)f_x(\epsilon)の合理的な近似値を返すことができxxx高精度でϵϵ\epsilon:|x−fx(ϵ)|≤ϵ|x−fx(ϵ)|≤ϵ|x - f_x(\epsilon)| \leq \epsilonいずれについても、ϵ>0ϵ>0\epsilon > 0。このような関数を考えると、それがあれば、テストすることが可能であるx∈Qx∈Qx \in \mathrm{Q}またはx∈Zx∈Zx \in \mathrm{Z}?
18 computability  computing-over-reals  lambda-calculus  graph-theory  co.combinatorics  cc.complexity-theory  reference-request  graph-theory  proofs  np-complete  cc.complexity-theory  machine-learning  boolean-functions  combinatory-logic  boolean-formulas  reference-request  approximation-algorithms  optimization  cc.complexity-theory  co.combinatorics  permutations  cc.complexity-theory  cc.complexity-theory  ai.artificial-intel  p-vs-np  relativization  co.combinatorics  permutations  ds.algorithms  algebra  automata-theory  dfa  lo.logic  temporal-logic  linear-temporal-logic  circuit-complexity  lower-bounds  permanent  arithmetic-circuits  determinant  dc.parallel-comp  asymptotics  ds.algorithms  graph-theory  planar-graphs  physics  max-flow  max-flow-min-cut  fl.formal-languages  automata-theory  finite-model-theory  dfa  language-design  soft-question  machine-learning  linear-algebra  db.databases  arithmetic-circuits  ds.algorithms  machine-learning  ds.data-structures  tree  soft-question  security  project-topic  approximation-algorithms  linear-programming  primal-dual  reference-request  graph-theory  graph-algorithms  cr.crypto-security  quantum-computing  gr.group-theory  graph-theory  time-complexity  lower-bounds  matrices  sorting  asymptotics  approximation-algorithms  linear-algebra  matrices  max-cut  graph-theory  graph-algorithms  time-complexity  circuit-complexity  regular-language  graph-algorithms  approximation-algorithms  set-cover  clique  graph-theory  graph-algorithms  approximation-algorithms  clustering  partition-problem  time-complexity  turing-machines  term-rewriting-systems  cc.complexity-theory  time-complexity  nondeterminism 

3
手動メモリ管理またはランタイムガベージコレクションなしのタイプベースのメモリの安全性?
HaskellやIdrisのような、ガベージコレクションなしのシステムプログラミングを目的とし、ランタイム(または少なくともCとRustの「ランタイム」)を持たないタイプフルで純粋な関数型プログラミング言語が必要だったとします。多少なりとも、ベアメタル上で実行できるもの。 手動メモリ管理やランタイムガベージコレクションを必要としない静的メモリの安全性のオプションにはどのようなものがありますか?また、HaskellやIdrisに類似した純粋な関数の型システムを使用して問題を解決するにはどうすればよいですか?
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.