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

Above is one of the many reasons I prefer defclass to defstruct. Defclass doesn't do this ridiculous nonsense.


Many times when working with code that uses structs in Racket I have found myself fruitlessly grepping for the definition of some mysterious and troublesome function before eventually remembering to check whether there is a struct named foo with a member named bar somewhere. Normally this is not a problem so long as the file can make it far enough through the syntax phase that you can resolve the names. Yet somehow when the code is well and truly broken then somewhere, somehow, a struct will be involved without any way to resolve the member name. I say this having written my own symbol creating and binding macros before I realized the pitfalls and now dread having to go back and fix it. It seems like such a cool idea in principle.


It's a cool idea for programming and a terrible idea for software engineering.




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

Search: