3 ms·
> git log --end-of-options "$rev" -- "$path", Argh, that's when I wished for object oriented shells. Powershell sure isn't perfect but objects encoding their o
by _blk 2mo ago
> git log --end-of-options "$rev" -- "$path",
Argh, that's when I wished for object oriented shells. Powershell sure isn't perfect but objects encoding their own meaning really helps differentiate those cases (but it may not always help the user if types aren't clear to the reader)
- eru 2mo agoI don't think you need object orientation for that. Haskell and Rust solve these problems also just fine, without any OOP in sight.
- _blk 2mo agoHmm, not sure I understand. How are those shell based? I agree that rust and haskell are not your typical OO (or not OO at all in a traditional sense) I guess my poorly worded claim was less focused on the OO nature of psh than on the typization (which both of these also do) - if you knew what type $rev and $path are, it's easier to distinguish intent, whether objects or not.
- eru 2mo ago> Hmm, not sure I understand. How are those shell based? A shell is just a programming language that's well suited for interactive repl use. Compare https://en.wikipedia.org/wiki/Scsh https://en.wikipedia.org/wiki/Scsh Of course, Rust and Haskell aren't typically thought of as shells. Though if you wanted to and felt brave enough, you could use ghci as a shell. > I guess my poorly worded claim was less focused on the OO nature of psh than on the typization (which both of these also do) - if you knew what type $rev and $path are, it's easier to distinguish intent, whether objects or not. Agreed!
- desmaraisp 2mo agoIn this specific case, the oop nature of powershell doesn't actually matter, just the fact it uses structured input instead of raw string. It's like passing a struct to a function instead of a badly serialized representation of a value