News for hackers. Stuff that matters.
Re:Why is learning functional programming so damned hard? (2... by fsckboy on Sunday August 15, 2021 @09:58PM (#28194266)
ok, but forward on a boat is toward the bow, as unambiguous port and starboard
Re:Why is learning functional programming so damned hard? (2... by hn_go_brrrrr on Sunday August 15, 2021 @10:17PM (#28194349)
It's the difference between "forward for you" and "forward for the boat". Without words like "port", you might do the wrong thing when I say "take one step forward". Did I mean for you to go further in the direction you're already facing, or did I want you to step towards the prow?
Re:Why is learning functional programming so damned hard? (2... by shagie on Sunday August 15, 2021 @11:06PM (#28194591)
We use similar approaches with terrestrial navigation too.

At the intersection of Main and Oak, go two blocks east. The building will be on the north side of the street.

Those instructions are the same no matter what direction the person is facing or direction they came from.

However, on a ship, the absolute positions of NSEW (relative to the Earth) aren't as useful as the ship may be heading any direction (and may be going forward or reverse). So a different absolute coordinate system is use - fore, aft, port, starboard.

Re:Why is learning functional programming so damned hard? (2... by lupire on Monday August 16, 2021 @10:47AM (#28198759)
Terrestrial navigation is also multidirectional.
Re:Why is learning functional programming so damned hard? (2... by LanternLight83 on Sunday August 15, 2021 @10:28PM (#28194416)
It's not as unambiguous because, to the guy with his back to starboard, forward could just as easily mean port! It may seem clear if someone's shouting, and pointing, at the bow, but if I'm recounting the action of a tense combat scene and say he "slips on a banana peel and falls 'forward'", you can't know for sure what I mean- does he fall straight towards port, or does he a break a leg, twisting, tumbling toward the bow? c:
Re:Why is learning functional programming so damned hard? (2... by voidreaper on Sunday August 15, 2021 @10:18PM (#28194353)
You can step forward to any side of the boat.
Re:Why is learning functional programming so damned hard? (2... by gnubet on Sunday August 15, 2021 @10:54PM (#28194535)
In Soviet Russia, the boat can step forward to any side of YOU!
Re:Why is learning functional programming so damned hard? (2... by coldtea on Monday August 16, 2021 @07:37AM (#28196946)
It's not, because forward depends where you are looking it. That is, the front part of the boat might be on your back.

So "move forward" doesn't say much, whereas "toward the bow" e.g. does.

Same for left/right compared to port/startboard.