Back in the day when I was making videogames ( http://www.mysterystudio.com ), I implemented something similar for my framework. Most of the framework was declarative. There were Sprite objects that had an associated Image and a position (among other things). The onUpdate(dt) method of the "screen" didn't explicitly draw things on the screen, it only updated positions and other attributes of the Sprites, and the rend…
I've got to ask, for stuff like "Murder, She Wrote", did you license anything? If so was that hard and what was the process like?
The unreasonable effectiveness of declarative programming
51–60 of 128 posts
Re: The unreasonable effectiveness of declarative programming
#52Everything else is better to be done by some sort of imperative language. The declarative stuff can be a subset and a convention but you can always break out of it.
Re: The unreasonable effectiveness of declarative programming
#53Earlier quoted context omitted.
IMHO in a declarative language your example should be an error. You defined x twice. Intentionally or not, this is confusing, for others and for you in a week when you have to look at the code again. Also, why should the second binding override the first? You introduced a temporal dimension where later lines of code somehow override earlier lines of code. That is not a necessity in a declarative language. It may be h…
>> IMHO in a declarative language your example should be an error. You defined x twice. This would be an error in a language with immutable data structures. Declarative and immutable are not the same thing and there is nothing that says a declarative language must have immutable data structures.
Re: The unreasonable effectiveness of declarative programming
#54Basically, method-chaining allows you to concisely express programs, by hiding irrelevant complexity behind abstractions.
Re: The unreasonable effectiveness of declarative programming
#55Earlier quoted context omitted.
My friends and I love playing "Murder, She Wrote" on a big TV screen during downtime at LAN parties. We streamed it on Twitch for a while. We're big fans, great work!
OMG, seriously? You made my day Try the two Sherlock games if you can get them somewhere - these have a special place in my heart :)
Edit: read your other comment and saw the licensing stuff... Shame about games (and such) that you just cannot keep them for sale forever... But just let them die.
Re: The unreasonable effectiveness of declarative programming
#56Earlier quoted context omitted.
C has first-class functions support, but I don't think it's very easy to define such interfaces in C. Closures and automatic memory management seem to be the "magic dust" that makes this nice to use, first-class functions are necessary but not sufficient.
C doesn't have first-class functions, because you can't define new functions in general places (only at top level).
Re: The unreasonable effectiveness of declarative programming
#57Earlier quoted context omitted.
C has first-class functions support, but I don't think it's very easy to define such interfaces in C. Closures and automatic memory management seem to be the "magic dust" that makes this nice to use, first-class functions are necessary but not sufficient.
C doesn't have first-class functions, because you can't define new functions in general places (only at top level).
Re: The unreasonable effectiveness of declarative programming
#58Re: The unreasonable effectiveness of declarative programming
#59But remember that the problem with a declarative syntax, is that it needs a runtime, which typically the end user doesn't touch. And if the runtime doesn't take into consideration one use case, the user is stuck. Don't forget to provide an escape hatch.
Re: The unreasonable effectiveness of declarative programming
#60anim_set("cx", 100); anim_set("cr", 0); anim_interpolate(ease_cubic, "cr", /val=/10, /time=/3));
etc
don't know what are you trying to achieve here