6 ms·
Whoa this thread is way more harsh than I would have expected. Coding isn't always about maximizing development speed or avoiding arbitrary dogmas. Some things
by codemonkey-zeta 6y ago
Whoa this thread is way more harsh than I would have expected. Coding isn't always about maximizing development speed or avoiding arbitrary dogmas. Some things are just fun to code, and parsing S-expressions is one of those things. I'm glad the author shared their experience and actually plans to use it in a game. Better than writing the parser for fun and then throwing it away.
Also, the author admits they didn't go to University for CS. You know what you do as part of your CS degree? You write a parser for S-expressions. This is a curious and driven programmer learning CS and sharing their discoveries. No need to berate them for not embedding a scheme....
- dbtc 6y agoI think it is responding to a project as if it were a product.
- platinumrad 6y agoEven if it were a product there is simply no justification for embedded a second language when all you want to do is read some config files.
- wizzwizz4 6y agoSure there is! Shaves a few hours off the initial development time, adds a few milliseconds to execution time (this is scheme we're talking about), adds a few days to later development.
- deleted 6y ago[deleted]
- fsloth 6y agoI don't known what products you have maintained but I've seen that large software products have a tendency to function as embedded-language magnets. Sometimes the languages are beautiful domain-specific things that work out of the box and expose a very complex configuration setup in portable format to any platform. In the worst case they are the most horrible hodge-podge where one party was supposed to do one thing without told what the end result should be, then another party took the existing work and made it work. I'm using language here in the most wide meaning, thus it includes ad-hoc configuration scripts, inhouse schema parsers, and in-code abstract syntax trees. This is really beautiful and elegant. First, it does not make my eyes bleed. Second, it does not make me vomit. (I'm only half kidding. The things out in production... shudders). Third, s-expressions are a succint and extendable way to store configurations. s-expressions are just as portable as XML. Sure, you don't get the xsd schema to verify existing data ... but then again, how many ad-hoc xml configuration files have a schema to go with them.
- dang 6y agoThere's plenty of justification; for example, because you felt like it. On HN, people don't need to justify their interests or their pleasures. It is the scolds who are at fault.
- platinumrad 6y agoSure, I was imprecise in my language. There is no justification for insisting that one is misguided if they don't embed a full langauge, as many of the early comments suggested.