Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Because (as far as I know) that's not the case for most other languages. It's an interesting (and certainly not necessarily "wrong") way to program when you aren't sure about how to write something. Python has something similar, that I will occasionally utilize for this purpose, but it doesn't show documentation (as far as I know) or anything like that while it sounds like gchi has functionality kind of like CLI tools' "--help"?

With C#, intellisense takes the role of gchi and does pop up say the valid methods and properties of a class, and iirc includes documentation text.

So it's less about that haskell has "coding help" built in and more about how that's presented to and interacted by the developer.



Python does indeed have similar functionality:

    $ py
    >>> help(print)

    $ ghci
    λ> :doc $
This returns the same documentation provided by intellisense.


Right on.

To be clear, the core "issue" is whether developers use or like to use that functionality, and to that end I say I never use it for Python (obviously- since I didn't know of its existence). More succinctly, it seems like other languages have "more popular" alternatives.


Agreed! I've never found myself making much use of Python's help feature, but I do all the time in Haskell! Wonder why?


If you're being facetious, I would love to know why you use Haskell's but not Python's. Is it a better UX? A lack of alternatives like intellisense?


Totally serious. I'm not claiming it's the best, but it's how I use the tools. There's a few reasons:

1. It's just how I learned. Googled my way through Python, then learned Haskell much later via a book which explicitly recommends using the REPL to get info about functions.

2. Types. I'm typically only looking for type information. A quick `:t` or `:i` is usually all I need in Haskell. I know Python half has them now, but I'm not

3. I'm certainly weird here, but I turn autocomplete and other pop-ups off. I find it distracting, and prefer the more intentional action of typing stuff into a REPL. Heck, I even do it in the VSCode terminal.

In summary: IDK, weird I guess. I should probably use it more in Python.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: