Hacker Newsnew | past | comments | ask | show | jobs | submit | rauli_'s commentslogin

Unchecked exceptions will eventually lead into programs crashing because some developer forgot to catch specific type of exception somewhere.

And developers never forget to check error codes.

Looking at code, it‘s easier to spot the missing check for an error code, than a not catched exceptions.

Also error codes are part of the signature of a function, which exceptions aren‘t.


If you need to wrap each call in try/catch, it's better to use return codes in some form or rethink the approach.

may I introduce you to the nodiscard attribute[1]?

  enum (class)? [[nodiscard]] Error {
    Ok,
    NoMem,
    ...
  };
[1]: https://en.cppreference.com/w/cpp/language/attributes/nodisc...


FWIW I’ve been using warn_unused_result in both gcc and clang since about 2020.

Yep, partial remedies are available for quite some time.

That seems like a better outcome than continuing when an error happened while thinking everything succeeded?

Yes, but that's not a dichotomy. Languages like Java have function declare what exceptions they throw, and the caller must either catch it or also declare that it throws it. Gets cumbersome quickly, but I believe it's for the best to encode exceptions at the type system.

In case you want to use React to make Web sites as well.

They should make a version of that runs as an app on a phone

They have one, it's called React Native Web Native

Mozilla later added them after the concept became popular thanks to Firefox. Mozilla and Firefox browsers coexisted for quite a while and Firefox was the lite version of Mozilla that didn't include E-mail client and other such features that Mozilla did.

Xfce is way too minimal to be great. An great DE must be written mostly in JavaScript and hoard gigabytes of memory in order to render a single window.


If I understand the target of your snark, Gnome shell on my machine uses 172MB of RAM, if I sum all other gnome-related stuff (gdm-wayland-session, gjs, gnome-session-service, etc), it's 200MB.

Hardly GB. You don't have to lie to make a point.


yeah, i have a couple older machines and tried xfce and it wasn't really worth it memory wise, sure xfce is probably lighter but it's easily less than 100 meg difference


Ok, but did you also run it for a while and compare how snappy or laggy the different DEs are? Because with xfc my old T440s Thinkpad from 2013 is still perfectly fine for browsing the web, or watching movies on the HD projector, without sacrificing too many modern interface conveniences.

I can't say the same for Gnome or KDE, and that's no slight against either (I happily use the latter on my more recent work laptop).

Having said that VSCode runs perfectly fine on the T440s too, so Electron and JavaScript aren't the fundamental reason those DEs are too demanding to use.


i ran gnome on this thing: https://www.techbuy.com.au/p/505010/NOTEBOOKS_11.3SCREEN/Len... for about 6 months, other than dropping to maybe 10fps while switching to overview it was perfect

tbh i kinda miss the 6hr battery life

xfce and gnome are by far my most used desktops and i probably would put effort into using xfce more if it supported wayland etc but i guess i like to tinker with newer stuff

to me the only reason to use xfce would be if i wanted to use a lightweight desktop app on a borderline useless computer, cause once you start trying to load websites you're going to blow through so much memory that desktop environments are irrelevant


I'm writing this on my old 2014 acer aspire.

Currently gnome-shell is taking 135MB of ram, with other gdm/gnome related background services ranging in 700KB-3.2MB each to like 20MB together.

And it's as snappy as my sway config I log into depending on the needs.

I just spammed virtual desktop changes, opening Files, browsing, and it's as snappy as it is in sway.

I think gnome is getting a lot of unfair performance criticism online as it looks like something that would be slow. Maybe it was slow back in the starting gnome3 days. Maybe there are some heavy differences in how distros package it? (arch btw)

... though I will say that from my experience it's the KDE that's the slow one. I don't have it installed currently on this machine but had in the past and have it on my steam deck(which is stronger then this laptop). It feels sluggish and I have this bouncing cursor wait animation in my head right now just thinking about it.


I wish there was a Chrome extension to filter out snarky meme comments like these.

I just don’t see the point in posting something like this aside from baiting an argument. There’s nothing about JS or Electron in this article.


A good reason not to use those LLMs if they can be manipulated that easily.


We already have Sailfish OS but no one is using it.


I have a Jolla phone preorder. I'll become a user next year (probably)


Future goal of the "digital euro" is to get rid of the banks.


The EU is planning on getting rid of banks ???


Not so much ‘get rid of’, but you won’t need a bank account to use the digital euro.


most people will use it through bank accounts , so not much difference


Traditional banks have already been severely disrupted by financial start-ups that only charge low fees. People will switch if they feel the cost pressure.


I don't know about the mainland but in the UK most fintech startups ultimately try to get a bank license and become fully fledged banks.


That's just the legal red tape to further encroach on the turf of traditional banks. They are still significantly cheaper.


I remember a time in early 2000s when everybody seemed to be raving about duck typed languages and how awesome they are. Now we have separate tools for the same languages to implement typing.


We were raving about new atheism too. Bad ideas come and go.


In my country soups made from stinging nettles have been eaten most likely for thousands of years. It tastes a lot like spinach and is full of vitamin C and such.


Which very very few people have actually installed on their system.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: