问题
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.
来源:https://stackoverflow.com/questions/6924009/hscurses-or-ncurses-which-one-to-use