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

> However, when more power is necessary, it is required; it is not possible, by the definition of Turing-completeness and declarative, to do the same thing with a declarative language that can be done with a Turing-complete language. So when that power is missing, the only option is to work around it.

I fall heavily into the use less powerful languages and "liberties constrain, constraints liberate" camps.

I'd be very interested in a real world example of this, though I know that class of examples is hard to come by.



> I fall heavily into the use less powerful languages "liberties constrain, constraints liberate" camp.

For what it's worth, so do I. That's why my build system will allow users to set those constraints. It's a great idea.

> I'd be very interested in a real world example of this, though I know that class of examples is hard to come by.

There are many, but I'll say one: anything that requires iteration until a fixed point is reached. A concrete example of this is building documentation in LaTeX.

Or it may even be simpler than that. Maybe your build requires some sort of special code should two arguments have specific values. In other words, edge cases often require Turing-compete power to resolve.


Ok then, would you consider markup languages declarative, XML... XSLT?


Yes. They are declarative.


Would you consider lisp to be (possibly) declarative?


Not all lisps are declarative, but a lisp certainly can be declarative.


No, it is Turing-complete.

I was going off of the article and Nix documentation that says Nix is declarative. But if it actually is not, then there shouldn't be a problem with power.

However, Nix proponents shouldn't claim it is declarative either.


Laziness, and purely functional go a long way toward declarative.


Declarative has a few definitions with respect to computer languages, and the Nix community seems to be using one and ignoring others.

When I think of declarative, I think of a language that has less power than a Turing-complete language. Think Make without bash or any shell. Or HTML without CSS.

In other words, the Nix community seems to use "declarative" as meaning "without side effects" where some programmers, like myself, hear "declarative" and think of something like HTML without CSS or JSON.




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

Search: