Aliasing Behaviours?
Closed this issue ยท 3 comments
Behaviors
Or Behaviours if you're in ๐ฌ๐ง, ๐ฎ๐ช, ๐ฆ๐บ, ๐จ๐ฆ, ๐ฟ๐ฆ, ๐ณ๐ฟ, ๐ง๐ผ, ๐ฌ๐ฒ, ๐ณ๐ฆ, ๐ฟ๐ฒ, ...
โ Deku Docs, https://purescript-deku.netlify.app/functional-reactive-programming/behaviors
This is a bit weird TBH. Dialect v. nation one is currently located in aside, it looks like you spotted an issue by calling it out to begin with.
Could you imagine the burden of aliasing to worth it for accessibility for users? Iโm of the โbehaviorsโ camp myself, but Iโve watched coworkers struggle with dialectal issues with CSS and fingering a โcolourโ to get syntax errors. I mean look at this weirdness in JavaScript @ AnalyserNode
which I have spelled wrong a couple of times under the assumption that most Web APIs take on American English, or the annoyance of Nix with its --optimise
flag I always spell wrong. It is not a good feeling when to you something is spelled correctly but the spellchecker or compiler tell you that you are wrong.
module FRP.Behaviour where
import FRP.Behavior
type ABehaviour = ABehavior
type Behaviour = Behavior
-- etc.
As a precendence, the Erlang language seemlessly supports both behavior and behaviour as keywords (and oddly Purerl had decided only behaviour was valid).
Drawbacks: extra code to maintain, could be harder to use like Pursuit to find something (but for others it could be easier if they did not assume they should use a dialect they do not speak).
Useless anecdote: a while back I proposed semi-seriously a sigil like %
to denote an alternate spelling to make this sort of thing better supported by docs which folks found silly
%myBehaviour
myBehavior โท โ a. a โ Unit
myBehavior _ = unit
I'll leave this open but wait to make a change until someone requests it based on an issue they have using the lib.
Renamed to Poll
, which I believe is spelled that way in all dialects of English! ๐ฌ๐ง ๐บ๐ธ ๐ฝ (they speak English too... sometimes...)