Skip to main content

Posts

Showing posts from September, 2024

Declarative Programming With AI/LLMs

  What Is Declarative Programming Broadly speaking, there are two ways to program/instruct a computer to perform a task, they are imperative vs declarative programming. Imperative programming is what we do the most, we write all the code necessary for the computer to perform a task such that the only thing left for the computer to do is fetch and execute CPU instructions. If you are using Java,C#, Javascript...etc you are doing imperative programming. Declarative programming is a higher-order form of programming, we instruct the computer to perform a task but otherwise let it "figure out" how to do it. Declarative programming requires some sort of software based execution engine. Whereas with imperative programming our code gets compiled into some machine/byte code and then run by the CPU, declarative programming requires a layer of software that does the "magic" that allows you to use it without having to write the precise logic for completing tasks.  I would guess