
asibbald
Programming Phoenix LiveView: P156
“…With this function, we name the concept of a base query and we provide one common way to build the foundation for all Demographic queries. This type of function is called a constructor. We’ll rely on it to create an initial query for demographics…”
I struggle to understand this paragraph
-
“with this function “ - which function is being referred to? Query? base? for_user?.
-
“we name the concept of…” do you mean something like “we introduce the concept of…?”
-
“…we provide one common way to build the foundation for all Demographic queries…” It’s not clear how we do this.
Given that there are at least three new concepts being introduced here, it would be useful to expand the discussion, and/or provide a diagram or pseudocode to assist.
Marked As Solved

SophieDeBenedetto
All great points/questions, thank you @asibbald! I’ll take them one at a time:
“with this function “ - which function is being referred to? Query? base? for_user?.
We do mean the base/0
function. I’ll clarify that in the next release
“we name the concept of…” do you mean something like “we introduce the concept of…?”
What we mean here is that we are encapsulating the responsibility of the base query and giving it a name.
“…we provide one common way to build the foundation for all Demographic queries…” It’s not clear how we do this.
What we mean here is that the base/0
function provides this common functionality for the first step of writing any new query for demographics.
I think we can add some language to clarify this a bit.
Popular Prag Prog topics










Other popular topics









Latest in PragProg
Latest (all)
Categories:
Popular Portals
- /elixir
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /clojure
- /react
- /quarkus
- /go
- /vapor
- /react-native
- /v
- /wasm
- /django
- /security
- /nodejs
- /centos
- /rails
- /haskell
- /fable
- /gleam
- /swift
- /js
- /deno
- /tailwind
- /assemblyscript
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /c-plus-plus
- /preact
- /flutter
- /actix
- /java
- /angular
- /ocaml
- /zig
- /kubuntu
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /html
- /keyboards
- /emacs
- /nim
- /vuejs
- /nerves
- /elm