5 ms·
I hope we're nearing the end of the era where we're editing text in a bubble of tooling that understands ASTs but has to map everything back to text. I look fo
by __MatrixMan__ 3y ago
I hope we're nearing the end of the era where we're editing text in a bubble of tooling that understands ASTs but has to map everything back to text.
I look forward making tabs vs spaces a viewer setting and not an author choice.
- raincole 3y agoPeople have kept saying this since paredit...
- __MatrixMan__ 3y agoYes, but we've been getting closer since then. Unison, for instance, is a step in this direction.
- ianlevesque 3y agoAgreed. Even beyond that it would be great for merging & conflict resolution too.
- __MatrixMan__ 3y agoRight. Line-wise diff is such a crude instrument.
- mfashby 3y agoYou can already get some tools e.g. https://difftastic.wilfred.me.uk/introduction.html https://difftastic.wilfred.me.uk/introduction.html which try to do semantic rather than purely textual diffs
- akhosravian 3y agoTabs vs spaces has been a viewer setting for decades for tab users.
- globular-toast 3y agoExactly! A tab is literally "1 level of indentation". You can render that one level any way you like. Unfortunately, though, everyone who has used tabs got bitten by stupid text editors that don't make it obvious whether you've used a tab or a space and substitute a tab for any run of 8 spaces. So if you're aligning an argument list you'll get a mixture of tabs and spaces. Everyone got bitten by this once back in the day then switched tabs off forever. They then switched tabs off in the text editors that the next generation are using.
- __MatrixMan__ 3y agoI suppose there must be some data in the serialized program which marks the start and end of a function body. But rather than having the semantics of that marker be: > This is indentation whitespace, display it how you like It should be > This is a function body, display it how you like Not only should readers be able to differ about how much whitespace is shown. They should be able to differ about whether it's whitespace that is used at all. Maybe they want something crazy like it makes a different kind if sound when you look at it, or appears in a different color or font. Whatever it is, it's no business of whoever is writing the program--they ought to be able to have an entirely different experience while still kicking out the same program.
- BeFlatXIII 3y agoI don't understand the appeal of pretty alignment of arguments with the last character of the function name in the row above. What's wrong with just using one more standard indentation level, like Black does in Python?
- globular-toast 3y agoBlack uses more lines. PEP-8 is generally more compact. I'm more than happy to let something like Black handle formatting for me, though. Sure, there are some occasions where my own formatting would have been better, but the benefits far outweigh the (very small) costs here. The silly thing is with tools like Black etc. it should be possible to use tabs again. If the only reason against tabs is people fuck it up, there's really no reason to use spaces in an auto-formatted project.
- OJFord 3y ago> I look forward making tabs vs spaces a viewer setting and not an author choice. But then we'll just have AST vs tabs & spaces. A layer down, tabs already should've solved 2 vs 4 vs 8 vs whatever spaces by making the semantic separation a single character, and the representation of it an author choice.
- cmrdporcupine 3y agoWe're nowhere near the end of it, in fact the industry just doubles down on this model every year. It's just the lowest common denominator, and it will always be that. Revision control tools, editors, compilers, the entire world is built around this. And there's no single alternative that could take its place. The reality is that systems like a Smalltalk image or stored procedures in a database, or a fancy IDE, or whatever are just going to have to bundle tools for good interop with filesystems at that level, and that's just how it goes. In the end what we have in text files is a mediocre, but universal, interop system.