by skrebbel · 7mo ago · 0 comments
endreleg fart er 80
This is weird! It can change but it is 80? Was it already? Will it forever? Should that maybe be "blir" instead? (pardon my nonexisting Nynorsk, I'm extrapolanorsking from Danish "bliver") Eg: endrelig fart blir 80
So that later it can become a different value, eg fart blir 90
And the imperative nature of this bit of code is immediately clear to the reader.Now it is "låst" and "open", as in:
låst fart er 80
open fartsgrense er 110
Mostly because the length difference between "endreleg" and "låst" triggered me.I don't disagree with you per se, but I think we can look at it another way: See assignments as statements of fact. The sky is blue. Himmelen er blå.
aka himmelen er blå. A statement of fact.
Also, "blir" becomes yet another keyword. More keywords, more to remember. Not that this has been a real consideration or worry in Brunost so far. The design so far is very much "What I felt was okay that day".
I do agree with the fact that this reads nicely:
open fart er 80
fart blir 50This makes sense in functional languages where variables can't change, but not in imperative languages like Brunost. When a fact changes halfway the story, it wasn't much of a fact. Himmelen er blå, inntil den blir rosa.
I too like your final example.
<3