Readit News logoReadit News
tapirl commented on Why Go is not my favourite language   blog.habets.se/2013/10/Wh... · Posted by u/behnamoh
bccdee · 7 days ago
All the examples in that article are very exotic.

  for i, p := 0, (*int)(nil); p == nil; fmt.Println(p == &i) {
    p = &i
  }
Be honest, how many times have you actually seen code which depended on the address of a variable declared in a 3-clause for-loop remaining stable across loop iterations? Nobody does this. It's extremely weird and un-idiomaic. Heck, 3-clause for-loops are somewhat uncommon in and of themselves. Conversely, everyone who writes Go has experienced unintuitive capture issues with for-range loops.

Are you actually aware of any breakages this change has caused?

tapirl · 6 days ago
This one is just an example to demo one case of backward-capability breaking.

> All the examples in that article are very exotic.

Have you carefully read that article? All? You must be kidding. The article shows several cases used in practice.

tapirl commented on Why Go is not my favourite language   blog.habets.se/2013/10/Wh... · Posted by u/behnamoh
nacozarina · 7 days ago
this is a repeating pattern with languages; there's no commitment to design coherency, no governance, just a mad scamper to stuff features into the project until it becomes an absurd caricature of itself.

C++ did it so egregiously & disastrously you'd think language maintainers would have been scared straight. No, like moths to a flame, it is the preferred hill to die on.

This is how C99 keeps winning when it bleeping should not. It's settled science, however imperfect. It's not getting rearranged because someone read a blog post. It has stability in real-world clock-on-the-wall terms like nothing else.

tapirl · 7 days ago
The change made in Go 1.22 for 3-clause-for loops is not a new feature. It simply broke backward compatibility and old Go principles. It is much worse than C++'s stuff features.
tapirl commented on Why Go is not my favourite language   blog.habets.se/2013/10/Wh... · Posted by u/behnamoh
bccdee · 8 days ago
for-loop variable capture was maybe the #1 worst decision in the language. It was never what you wanted. I appreciate Go's commitment to backwards-compatibility, but in this case breaking it was the right choice.
tapirl · 7 days ago
It is only right for for-each loops.

For 3-clause-for loops, if you have read https://go101.org/blog/2024-03-01-for-loop-semantic-changes-... carefully, it is hard to think it is right.

tapirl commented on Why Go is not my favourite language   blog.habets.se/2013/10/Wh... · Posted by u/behnamoh
tommica · 8 days ago
What is your language of choice now then?
tapirl · 7 days ago
zig now.
tapirl commented on Why Go is not my favourite language   blog.habets.se/2013/10/Wh... · Posted by u/behnamoh
tapirl · 8 days ago
Go was my favorite language for a long time, and I have written many books and articles about it. However, since the release of Go 1.22 [1], that is no longer the case. Go 1.22 damaged Go's reputation for promoting explicitness and maintaining strong backward compatibility.

[1]: https://go101.org/blog/2024-03-01-for-loop-semantic-changes-...

tapirl commented on Show HN: Ferrite – Markdown editor in Rust with native Mermaid diagram rendering   github.com/OlaProeis/Ferr... · Posted by u/OlaProis
mgaunard · a month ago
The main issue is that Markdown remains a pretty primitive language to write documents in, with dozens of incompatible extensions all over the place.

I don't know if it's the best format to focus on.

tapirl · a month ago
This is one reason why I created TapirMD, which offers better specificity.
tapirl commented on CSS sucks because we don't bother learning it (2022)   idiallo.com/blog/learn-cs... · Posted by u/Brajeshwar
tapirl · a month ago
CSS sucks because it is sometimes elegantly simple and intuitive, other times a maze of quirky, frustrating hacks.
tapirl commented on Jeffgeerling.com has been migrated to Hugo   jeffgeerling.com/blog/202... · Posted by u/mikece
susam · a month ago
A few years ago, I decided to migrate my personal website to a Common Lisp (CL) based static site generator that I wrote myself. In hindsight, it is one of the best decisions I have made for my website. It started out at around 850 lines of code and has gradually grown to roughly 1500 lines. It handles statically rendering blog posts, arbitrary pages, a guestbook, comment pages, tag listings, per tag RSS feeds, a consolidated RSS feed, directory listing pages and so on.

I have found it an absolute joy to maintain this piece of little 'machinery' for my website. The best part is that I understand every line of code in it. Every line of code, including all the HTML and CSS, is handcrafted. This gives me two benefits. It helps me maintain my sense of aesthetics in every byte that makes up the website. Further, adding a new feature or section to the site is usually quite quick.

I built the generator as a set of layered, reusable functions, so most new features amount to writing a tiny higher level function that calls the existing ones. For example, last month I wanted to add a 'backlinks' page listing other pages on the web that link to my posts and it took me only about 40 lines of new CL code and less than 15 minutes from wishing for it to publishing it.

Over the years this little hobby project has become quite stable and no longer needs much tinkering. It mostly stays out of the way and lets me focus on writing, which I think is what really matters.

tapirl · a month ago
Similar to my "Go 101" books website, about 1000 line of Go code (started from 500 lines at 9 years ago). The whole website can be built into a single Go binary.

Deleted Comment

tapirl commented on Replacing JavaScript with Just HTML   htmhell.dev/adventcalenda... · Posted by u/soheilpro
tapirl · a month ago
> Tabs should be navigable by arrow keys [4], which also requires JavaScript.

It supports this now (with JavaScript). If not, try to refresh the page.

tapirl · a month ago
typo: s/with/without/

u/tapirl

KarmaCake day850February 7, 2015View Original