2 ms·
> It's declarative, so it tells you what you're actually doing, rather than just how to do it. This is like the difference between saying "get me an orange", an
by TeMPOraL 6y ago
> It's declarative, so it tells you what you're actually doing, rather than just how to do it. This is like the difference between saying "get me an orange", and giving full instructions for finding a shop that has oranges, navigating to it, etc. I know declarative programming exists (and it has these advantages) but I've never seen it used outside CS courses.
I find this to be a problem quite often. Maybe my brain is wired differently, but I can't keep declarative definitions in my head and apply them unless I know of an imperative strategy to make them work.
I've first noticed this when, in high school, I was struggling to understand the epsilon–delta definition of a limit. The one that goes like this: https://wikimedia.org/api/rest_v1/media/math/render/svg/619debbeb78a82c1c368a3e53470dbc167a088bd https://wikimedia.org/api/rest_v1/media/math/render/svg/619d....
Only after many hours of classes, followed by many hours of staring at the formula, all over the course of weeks, I finally understood what it means. The one missing puzzle piece that no one explained to me was that, when you see "\forall _{sth > 0}", you should read it as "in particular, for a sth arbitrarily close to 0".
Declarative notation is fine if you comprehend all consequences of that declaration. In cases where you don't, it would be nice to have it spelled out which consequences are relevant.
- a-nikolaev 6y agoYeah it depends on the particular theory. Say, if you want to implement some physics model as a computer simulation. Often, physics is presented as a set of interconnected of equations (some are general, some are based on assumptions, representing special cases). Unfortunately, most of the time these equations are not built "bottom-up", so to speak. They do describe various aspects of physical reality, but often don't allow a nice computational/operational interpretation of it right away. So converting this knowledge into a computational model can be non-trivial.