Hacker News new | past | comments | ask | show | jobs | submit login
How to Write Computer Programs (2015) [pdf] (dyalog.com)
93 points by secwang on April 30, 2024 | hide | past | favorite | 6 comments



> When we become proficient in describing the result in terms of the argument, using only the present tense of the verb to be, we could experiment with writing the description in a different language (French, Latin, Esperanto, ...) before transliterating it into code.

This is going to be a funny exercise for languages that don't have the forms of the verb to be for the present tense.


(that wasn't his point, but) Just elide the copula, mutatis mutandis.

For instance, in BELTABOL[0], an is-y language in lang belta[1], statements are (insofar as possible) in grammatical belter creole, which elides present tense to be. The missing copula is in square brackets in the translation below:

  Da gcd im fong max,walowda(wok)
  gcd, it [is] out of max,many(walk)
Lagniappe: https://www.youtube.com/watch?v=ezU-F028krU

[0] https://github.com/demaere-oiie/beltabol

[1] https://en.wikipedia.org/wiki/Belter_Creole

Xalte ere gova da Cant!


> This is going to be a funny exercise for languages that don't have the forms of the verb to be for the present tense.

You mean Russian?


Declarative programming is quite elegant, but it is not the same as prompting. I recently had an argument with someone who claimed our declarative code for running analyses over documents was "hard coded". In our product, our approach is to use a functional language approach for analyzing documents. He was an expert in NLP and said that his users required the ability to instruct the system in natural language - English. It still was weird that someone call our declarative program - "hard coded". My, how times have changed.


> One significant downside of is-y programs is that in general they run slower than corresponding do-y programs.

I wonder about this. It seems like the ultimate in declarative programming is prompt engineering: just describe the problem and let the computer decide how to break it down. As of now, humans can still find more efficient ways to break down problems than computers can.


A non-deterministic autocomplete system != declarative programming: there isn't any level of precision nor specificity that comes from writing prompts to give to an LLM.

If you're interested in learning more about declarative programming, check out functional programming and logic programming.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: