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

> It's difficult for statically-typed languages to provide one.

No, it's not. As long as you have a way to polymorphically print a return value, which there are ways around (in Go, with reflection; in Haskell, with typeclasses; in Java, with Object's toString), there is nothing semantically difficult about a REPL for statically typed languages.

> there's no dynamic typing

Yes, there is, through `interface{}`.



The main thing stopping Go having a REPL (when there are ones for C, for example) is that Go can't yet compile to, or load, dynamic libraries. This stops each bit of REPL being compiled up and executed, which would otherwise be simple.


And most likely never will, given the Go's team stance on dynamic linking.




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

Search: