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

There's no "integration" here, only a pointless scaffolding code generator.

I really really hate scaffolding tools. They generate pages of code that I didn't write out myself, that I have no idea what functionality they implement, and that will be hopelessly broken on the first API upgrade in any of the tools the generate code for.

Can we please not have this kind of crap for Haskell? You can say I don't have to use them, but it is worse than that. These kinds of generators encourage poor library design. Instead of the 4 lines of code that I can use to get my website started with Scotty, they encourage a style of library design where I need hundreds of lines for minimal functionality.

If you really want to show people how to use Scotty and Angular, can't you just publish an example as a gist?



The price of popularity. With this increase in pro-Haskell talk in the echo chamber there will almost certainly be an increase in the number of people trying it out.


Let's help them try it out the right way. For instance, here is an example I wrote using Spock (which is built on Scotty), Spock-worker and SQLite:

https://github.com/openbrainsrc/makeci

I'd love to see other people's Scotty/Spock projects.


Scaffolding gets wrong when it tries to write non-obvious code instead of automating writing obvious repetitive boilerplate one.

I think things like those https://github.com/rayokota/generator-angular-scotty/blob/ma... should be put into a well-documented library for others to export and use. This is a straightforward approach to make things one writes available for everybody else.

And then, I guess, scaffolding with no-brainer one-liners like `put "..." $ updateModel ...` is fine by me.


write non-obvious code instead of automating writing obvious repetitive boilerplate one.

That's fine and all but Haskell's a powerful enough language to abstract away most boilerplate. What little remains can be taken care of with the TemplateHaskell extension. For a nice example of a library in Haskell that requires almost no boilerplate at all, check out XMonad. All of what you'd expect to be boilerplate is packed into a variable called defaultConfig.


Instead of knocking down someone for taking the time to share something of value, why don't you contribute as well? Sounds like a win-win to me.


My point was not at all that this is a poorly implemented code generator for Scotty. What I am arguing is that this whole category of tools are counterproductive for languages like Haskell that enable and emphasise good library design. There is nothing I (or any of the much more skilled Haskell programmers out there) could contribute to this tool to save it. It is beyond redemption.


Starter/example projects are nice to have when you are learning because they put something bigger than "Hello, World" in your hands, and I'm certain people will find this useful. To call a project like this "beyond redemption" is not very friendly to newcomers to Haskell. It's difficult to think about library design when you cannot yet perform everyday tasks in the language.


I would never criticise a beginner's Haskell project, but when people start providing resources for beginners that send them in the completely wrong direction, I think we have a right to point that out, and that takes precedence over not hurting the feelings of the people building said misdirections.

My point is that if you are a newcomer to Haskell, then this is not the way to start learning. If your first project in Haskell is a yeoman generated web server that activates any number of GHC extensions, you will be stumped by the first encounter of .. "No instance for Data.String.IsString a0 .." that you get from GHC.

Examples are fine, we clearly need as many of those as possible. If you copy code from an example into your own project, at least you have some idea of where that code comes from and what it does.

I don't understand your point about library design. Library design is the responsibility of the person who implements the library, not the beginner who is using it.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: