Hacker News new | past | comments | ask | show | jobs | submit login

Good point about the function name typo in static type language. Provisional and complete functions are supposed to be different. The compiler can have a validation mode to flag all provisional functions, which would catch the wrong function name intended for a complete function.

The "message not understood" hook in dynamic languages is good for runtime handling of missing functions, but I actually want the compiler to generate the source code for the provisional functions, to make exploratory development easier.




IIRC, Haskell has some explicit marker for adding stub functions ("doThatStuff x y z = undefined" or something like that). You still write the names for the function and any arguments, though.

I tend to write code bottom-up rather than top-down, testing it in a REPL and/or with tests, but have Emacs functions to generate boilerplate for languages that need it.




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

Search: