I'm writing a program which needs a UI. The program is in haskell. For the UI, I think of using ncurses library. Should I use hscurses library for haskell and write the UI in haskell or should I use ncurses library and write the UI in C and call haskell functions from C?
Which is the most preferred way?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I don't see any advantages in writing the UI in C and call functions from C.
You can choose how you are going to do the UI from several libraries available on Hackage :
- hscurses
- ncurses
- nanocurses
- vty and vty-ui
- ansi-terminal (on windows)
I don't know which is better, there's a small description but not enough. Nanocurses seems more portable but with less features.