• 362 Posts
  • 208 Comments
Joined 1 year ago
cake
Cake day: June 13th, 2023

help-circle




  • Well, that was something… I have used ligatures in my code editor for quite a few years now, and I have NEVER been confused about the ambiguity this person is so upset about. Why? I have never ever seen the Unicode character for not equals in a code block, simply since it is not a valid character in any known language. In fact, I have never even seen it in a String where it actually would be legal, probably since nobody knows how to type that using a standard keyboard. This whole article felt like someone with a severe diagnose have locked in on some hypothetical correctness issue, that simply isn’t a problem in the real world.

    But, if you for some reason find ligatures confusing, then you shouldn’t use them. But, just to be clear, there is not a right of wrong like this blog post tries to argue, it is a matter of personal taste.








  • The problem is that C is a prehistoric language and don’t have any of the complex types for example. So, in a modern language you create a String. That string will have a length, and some well defined properties (like encoding and such). With C you have a char * , which is just a pointer to the memory that contains bytes, and hopefully is null terminated. The null termination is defined, but not enforced. Any encoding is whatever the developer had in mind. So the compiler just don’t have the information to make any decisions. In rust you know exactly how long something lives, if something try to use it after that, the compiler can tell you. With C, all lifetimes lives in the developers head, and the compiler have no way of knowing. So, all these typing and properties of modern languages, are basically the implementation of your suggestion.













  • Well… it is true that it doen’t have all these crates like Url included in the rust standard library, and hence it is not official. On the other hand Url was created by Mozilla to be used in Firefox, hence it is a quite competent crate that is very well maintained. And my guess is that the http crate may have the same kind of origins… but I’m not entirely sure about that.

    And even Java that includes quite a lot, still didn’t get a good Http library until very recent, until then you had to rely on some obscure library created by the unknown organization Apache… so…

    As a developer you always have to think about what libraries you use, and if you trust them… that goes for pretty much any language.



  • I learend it in the 90s, and was working on a large Perl codebase 2005 and a couple of years forward. And 20 years, it still started to feel dated, and 15 years ago it was just so out dated it hurt. So, starting to learn Perl 20 years ago would not have been great :) However, the things making Perl horrible, is pretty much threre in Python also with the addition of significant whitespace… so technically, going from Python to Perl might actually be a step in the right direction… Now, if you excuse me, I will hide behinde this huge rock for a while to let the incoming projectiles settle.