My Authors
Read all threads
@AnneOgborn @rzeta0 After a bit of playing with SWI so far I was impressed with many aspects of it. Running web server and web interface was remarkably simple. More or less the same as doing it in Python / Flask etc.

But there were things in Prolog which seemed inconvenient / counter-intuitive. \1
@AnneOgborn @rzeta0 These are conceptual things, and I guess you could argue that fixing them would mean it isn't Prolog any more. But they managed to stop me going further.

Some examples ... \2
@AnneOgborn @rzeta0 It's a pity that Prolog doesn't have functions for things that we intuitively think of as functions. Ie. numeric calculations or basic string processing etc.

Always having to think and write these in the form of relations feels unwieldy and overcomplicated. \3
@AnneOgborn @rzeta0 In particular, I'm used to FP higher-order functions maps and folds and filters etc.

I couldn't find equivalents for Prolog. All the examples of handling collections, you seemed to have write your own recursive routine to walk the data every time. \4
@AnneOgborn @rzeta0 State management is also mysterious.

I'm a big fan of FP immutability. But the division of Prolog into fixed db of facts, and repl for queries, left me unable to figure out how to write applications where users build up a db of facts through interaction. \5
@AnneOgborn @rzeta0 Or how I should track, say, user state within a complex UI.

It seems like you should be able to build a great Eve-like reactive UI in Prolog. But it was hard to figure out where to start. \6
@AnneOgborn @rzeta0 I thought DCGs would make it trivial to write parsers and compilers for DSLs and for transforming data-files from one format to another.

But I couldn't find the basic file-system and string handling support that would actually make this simple compared to, say, Python \7
@AnneOgborn @rzeta0 If you wrote a book that dealt with these things :

- programming with higher-order "functions" for data manipulation,

- managing state in UIs and other user-build dbs, and

- how to write real parsers / compilers / file transforms, then I would definitely buy it.

\end
Missing some Tweet in this thread? You can try to force a refresh.

Keep Current with phil jones (he/him - ele)

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!