5 ms·
If you're going to generalize across programming languages and assert that they suck at something, I expect so see evidence of knowledge in many, many programmi
by michaelochurch 15y ago
If you're going to generalize across programming languages and assert that they suck at something, I expect so see evidence of knowledge in many, many programming languages. Not to be a jerk, but I don't see that sort of evidence here. (Then again, I don't have the kind of knowledge that would qualify me to make such assertions, or contrary ones, either.)
"Bad" typography isn't a big deal IMO. Yes, it's slightly embarrassing and ugly, in this Unicode-enabled era, that we use <= for "less than or equal to" and != for "not equal to", when Unicode has given us better glyphs. But honestly, I don't see how that costs us much time to get used to. It's like the parentheses in Lisp: more time is spent complaining about things like that than just adapting to it and making the problem go away. Parentheses wouldn't even crack the Top 5 of my complaints about Clojure (which is, despite some flaws, a great language).
Regarding monospace fonts, monospace is a huge asset. Sometimes you want to align a column of numbers, and you don't want 11111 to be narrower than 8888. Code isn't supposed to be "pretty" in the sense as a word document or marked-up Latex file. It's supposed to be easy to read and understand. Aesthetics are a part of this, but beauty at the expense of clarity is a no-go. Technical book writers could easily use non-monospace fonts for code examples and they don't-- for good reasons.
What matters is how the language looks after you've been using it for months. After 6 months using it, does the language still piss you off on a regular basis (note: no language is perfect and all will piss you off sometimes) or do you generally enjoy working in it? I've found that statically typed functional languages (Scala, Ocaml, Haskell) perform the best in this regard. The worst I've seen are Java and C++. But until you get comfortable with the languages, they all look the same (hideous, confusing, foreign).
We need to get rid of that kind of thinking—not just so that language design can move forward, but so that we can quit worrying about languages and get shit done.
Sorry, but... language differences aren't really about superficial appearances. Ocaml could be re-written with S-expression syntax and it wouldn't be much different. These differences are much deeper than that. The shape of code that emerges in a Haskell codebase is dramatically different (more "foreign" compared to conventional imperative programming, but generally less verbose and easier to maintain) from what appears in a C++ or Java codebase.
- evincarofautumn 15y agoMany well-designed proportional fonts have fixed-width numerals (if not by default, then available as alternates) to address alignment. I don’t think tech writers necessarily use monospace fonts for good reasons—most likely they’re simply accustomed to it, and it doesn’t occur to them that there’s something better out there. And this isn’t just about superficial appearances—I focused on poor legibility because it’s a readily apparent detriment to usability, but there are plenty of other things wrong with programming languages—enough to fill a book, which I should probably write. Strictly imperative programming, for instance, is a degenerate style of problem-solving that forces developers to exert far more effort than necessary to get the same amount of work done. Haskell is better, and more productive for me, than any procedural or object-oriented language I’ve used. Thanks for the comments, though. I really appreciate this kind of long-form feedback because it helps me improve my future writing.
- gtrak 15y agocounterexample, try this with a proportional font: abcde 11111 ilili 22222
- deleted 15y ago[deleted]
- tripzilch 15y ago> I don’t think tech writers necessarily use monospace fonts for good reasons—most likely they’re simply accustomed to it, and it doesn’t occur to them that there’s something better out there. Well, this coder that also happens to know his typography also uses monospace fonts, and for good reasons. I have brainstormed a bit now and then of how to enhance Python code with typography, just as an experiment, typeset some code in a nice way, but to use proportional fonts you'd have to work with tabs and ... well the only way I could see it work is to (re) write an IDE to automatically do this typesetting and layouting while the code behind what you see is still normal Python code that would look like you'd expect in a monospaced font, too. Because you can't expect code only to be readable in one specific IDE and not in others. That's one of the important parts of typography, you always need to work within the limitations of the medium, while producing things that look good. And while superficially, you might consider the medium to be "computer screen", you'll find that eg webpages and code views really do have different limitations that need to be taken into account when thinking about their typography. A little bit analogous to designing books or newspapers, both are made of paper, but very different styles and design choices (that are partly influenced by their respective limitations). > Many well-designed proportional fonts have fixed-width numerals (if not by default, then available as alternates) to address alignment. Saying this almost makes me thing you don't actually write code. As someone else points out, fixed-width numerals are only a solution if there are not preceded by other characters on the line. Otherwise you need to work with tabs, but lots of programmers prefer spaces and that's not something you want to make them change.