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

having Prolog-like syntax without Prolog-like semantics is silly.

Yes. Yes! I'm not the only one thinking it then!

I think the Erlang process model is brilliant but it really took on the ugliness of the Prolog syntax without attaining the full benefits of the Prolog logical semantics.



I think Erlang is brilliant because it keeps Prolog's unification (matching) but discards Prolog's backtracking in favor of procedural execution.

Unification can be very useful in solving some problems. Backtracking is also useful but sometimes gets in the way. Procedural code can be used to do anything that any language can do and students are more familiar with it. So I think Erlang is an interesting addition to languages. And that's without considering it's more practical aspects, e.g., multiprocessing, failover capability, etc.

Nor is Prolog syntax particularly ugly. A problem is that it is too simple, so simple that novices can become confused. Brna, Boulay and Pain discuss why Prolog is difficult in the book:

"Learning to Build and Comprehend Complex Information Structures: Prolog as a Case Study" http://www.amazon.com/Learning-Comprehend-Complex-Informatio...

See the review there by Randall Heltzerman titled "The Most Unlikely Book Ever to be Published".


My misogynistic and politically incorrect, but very accurate, metaphor for erlang is, "The Ugly Girl Who's Great In Bed." You don't mind doing the horizontal polka with her, but she certainly won't win any beauty contests.

That said, a few small changes to the erlang grammar could go a long way towards fixing it (changing separators to terminators, etc). Once you get more familiar with Erlang, you go from writing ugly cascading ifs on multiple conditions to simple clean case statements on tuples. You learn when to use function-clause matching vs. internal matching, etc.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: