I’d rather look at the other solution to shared mutable state: limited sharing - especially since that’s a new thing to look at and I’ve known how to do functional programming since 2010…
I feel like properly testing all of these would make it so that testing takes 99% of the development time, not just 50%. Heck, just testing all the valid input classes for a moderately complex system can take up 90% of the development time alone.
Finally a bloody article which reveals the truth to us all! Rust is just another Hipster-language which doesn’t bring enough on the table to really make people switch to it. No one will know this garbage-language in a few years. Mark my words!
And please, stop posting these horrible Rust-indulging articles on Lobsters. This is (used to be) a serious and interesting website.
I feel this opinion won’t be popular but… this reads like another case of bias confirmation after as little as trying to pay more attention to one’s own code. I’d like some data for a change, not “I felt that I understood my code better”. Otherwise it’s the same feeling you get about your computer being faster after you wiped the dirty screen after a while.
I think the article is right in asking people to try for themselves. I’ve used Acme for a couple months as my text editor at my workplace. This gave me the opportunity to use it for proper work while keeping Sublime Text at home for hobby projects. While I loved Acme’s particularities (tiling, mouse chords, unix terminal with plan9 utils.. on windows!) I loathed the lack of syntax highlight.
I didn’t really feel different with my code after taking aways colors, but I noticed both while and after not having it that I was making a lot of mistakes that syntax highlighting would have prevented (unmatched quotes, wrong braces).
In the end I went back to Sublime, however I’m trying to fill the gap left from Acme with some plugins for tiling and plumbing.
On the other end, I’m so dependant on my tools now that I’m used to not indent Go code on purpose because I use “gofmt-on-save” as a linter. (if it doesn’t indent it, it’s broken)
Good point with the indenting. Apart from coloring, that’s the other thing that tells me the parser and I disagree on what I wrote.
The strongest argument I have is that highlighting English actively makes it more difficult to read. Perhaps this is because we’re used to reading prose without highlighting, but even “lightly highlighted” text like this Sherlock Holmes story is infuriating (scroll down halfway to see some quoted strings).
I made this comment on lobste.rs last time highlighted prose was used as an example:
I made a long comment, in that same thread.
I no longer stand by it. I think it was unnecessarily divisive, and all my complaints came down to “there are no themes I like”. The solution to that is to make one, not to complain about it. And I have found that I do find coloring very useful to add visual texture to code, so that I don’t lose my place in it as easily.
I tried it and I think there’s something to it. I recommend everyone just try it for a few days.
I think that comparing the effectiveness of highlighting for spoken languages and highlighting for programming languages is comparing apples to oranges. We don’t read code the same way we read English.
A better parallel, in my opinion, would be syntax highlighting for a complex mathematical equation, in which case I think you would find it would make it much easier to understand and read.
I think using different colors for different variables might be useful with mathematical equations, but I doubt it would help to color variables one color, operations another color, functions a third color, etc., as we do today with code.
Crockford suggested a syntax highlighting where each scope was its own color.
I’ve seen a lot of structural editors for Lisp do things like this over the years. I don’t go that far, but I do highlight parens depending on nesting level, and it can be very helpful.
I actually use a vscode extension that adds this called “indent-rainbow”
In college I used a four color pen. I soooo used syntax highlighting as a way of keeping context like this on paper for many many mathematical constructs - matrices, graphs, equations, what have you. I even have a syntax highlighted regex set on paper filed somewhere in my room still.
Sure but in programming the grammar is a part of the meaning. In english the grammar is usually not relevant.
Edit: Amusingly the highlighted english was much easier for me to read. I have ADHD and often lose my place, and the color helped me keep track of which word I was on.
I legitimately think highlighting English makes it easier to read. You can easily pick out the subjects, objects and verbs easily and I think if someone was learning English the highlighting would be very helpful.
You know we actually do use ‘syntax highlighting’ in english in the form of underline, italics etc.
It’s just that this particular application of highlighting is awful, since it’s a transplant from code highlighting.
I don’t know about you, but I always feel like my computer is faster after I download some more RAM.
I was a kid, and I thought I knew stuff about computers. So when Connectix came out with this product called “RAM Doubler”, I giggled. What snake oil! But then we got a copy and lo and behold, I could run more programs than I had memory for! I was totally astounded.
Years later, having long forgotten about this, I was in my operating systems class, and I learned about virtual memory. It all snapped into place: RAM Doubler was a kernel extension that implemented virtual memory, which Mac OS didn’t support back in those days.
More details: http://www.ambrosiasw.com/Ambrosia_Times/January_96/3.1HowTo.html
IIRC, RAM Doubler also did memory compression in later versions. Maybe they also did black magic with the way memory management worked with contiguous blocks - the classic System had trouble with that. Their later companion product, Speed Doubler, replaced the 68k emulator on PPC Macs with a JIT, which improved performance because almost everything back then was emulated.
Totally agreed. Basically I found myself thinking “I paid attention to my code more” is the crux of the article.