是否值得为haskell创建一个纯图形库
我对 Haskell 很陌生,但我有一些想法。我想知道是否值得实现它(是否与推荐的 Haskell 风格一致以及是否尚未完成)。
我正在考虑一个以纯粹、抽象的画布对象为特色的库。它会像这样工作:
- 对象是不可变的。在其上绘图将创建一个新的画布(以列表构造的形式实现)。
- 它将是独立于任何实际渲染器的完全抽象的形状列表。
- 渲染器能够将这种抽象画布转换为位图和矢量格式。这将是使用该库时唯一需要的不纯操作。
你怎么认为?如果我得到一些经验丰富的 Haskellist 的批准,我会尝试一下。
I am quite new to Haskell, but there is some idea, I have. I would like to know if it's worth to implement it (if it's consistent with recommended Haskell style and if it isn't already done).
I am thinking about a library that would feature a pure, abstract canvas object. It would work like this:
- The object would be immutable. Drawing on it would create a new canvas (implemented as list construction).
- It would be completely abstract list of shapes independent from any actual renderer.
- There will be renderers able to transform this abstract canvas to bitmap and vector formats. This would be the only impure operation needed when working with this library.
What do you think? If I receive approval from some seasoned haskellist I would give it a try.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论