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

There are constexpr constructors


I'm looking for constructors that return immutable objects. Is there something in C++ that can help me?


Constructors do not return, and return type and lhs are decoupled, so you are looking for

    auto const &lol = make_wtf();


Well, more like I’m looking for something that gives you a const that you can’t get rid of. You could use a factory method but it’d be nicer if I could have a constructor that did it.


That's just not how C++ is designed. If you want const, you stick const on the member variables or declare member getter functions const. Then the language checks your work when you initialize an object into a constant variable.

This allows you to force an object to be immutable at a compiler enforced level regardless of how the calling code tries to initialize it.


Unfortunately I am trying to wrap const to something that wasn’t designed this way: https://news.ycombinator.com/item?id=20948523


Since soft const constraint is not part of the type, perhaps you could pass it to a lambda function that treats it as a const and another lambda function that treats it as mutable. A sort of const region and mutable region.


That creepy. Good catch OP


It would be cool to have the same price in western countries as well


So, they can keep their expensive phone in their store


The app itself is a Webbrowser (chromium), so you can't disable it


When you click on a link it opens on a in-app mode, I just want to be opened in the browser app directly.

I known it's a "browser inside the app" for the lite version, just wondering if there's a more general setting for this. Sorry to insist if the answer is the same. Thanks.


Cries with €30K in South Italy


Cries with 35K in North Italy


In Milan things were bettter.

/me cries with 35k in Center Italy (Rome)


Could you guys tell me why you think your salary is low? I don't quite get it how you can compare expensive living areas to no so expensive ones.

In Europe compared to US you have many preferences where you don't have to pay from your own pocket for: medicine, vacation time, retirement, education, social security and so on. Real estate price is also mush higher in expensive areas. Taxes are higher but you have all those nice benefits.


yeah, the EU sucks for tech salaries


I think it's wrong to say that in general for EU. There is a huge difference on salaries depending on where in the EU you are.


There is almost nowhere in the EU that $200K is normal. Maybe Zurich - I don't know.


200k might be normal but 30k would be below a entry level graduate many places.


where exactly?

I did some googling and the results suggest the average IT grad salary in London (which is very expensive and features some of the highest salaries) is around 30k.


scandinavia at least (the markets I have most experience with)

But https://www.cwjobs.co.uk/salary-checker/average-computer-sci... shows much higher salaries than 30k in london and germany too (https://www.statista.com/statistics/584759/average-gross-sta...)


the first source does not show grad salaries and the average is 57.5k, which is still a lot lower. the second source is paywalled and I can't open it at all.


May comment was not directed at the 200k but the 30 and 35k quoted.


Any ideas why though? I'm not eu based, but always wondered


I don't have a fully formed theory, but I believe it is a combination of things:

* there aren't any real EU tech giants

* the regulatory environment is tough on businesses: it's hard to start one and follow all the rules. The rules can also be different across EU states.

* poorer local market. Europeans generally don't have as much disposable income as Americans. It's harder to get a good amount of people to pay 20 EUR / month for a SaaS.

* different investor culture: if you failed once, you'll always fail thinking

* corporate and personal taxes are high, so there's not a huge difference between making 50k and 80k pre-tax.

* overall tougher social mobility, making it hard for top talent to get to the right people for funding, ideas, mentoring, etc

The lack of large and successful pure tech companies, means there are a bunch of good engineers, but little competition for them, which means lower salaries.

Some people say healthcare and more holiday days are another reason salaries are lower, but I don't believe that. First off, 2 more weeks of holiday doesn't add up to a 100k pay cut, neither does paying for private insurance. Second, it's nice that there's a govt run fallback option, but anyone that has had to deal with the system (in most, but not all EU states) knows that you eventually end up having to pay out of pocket or take private insurance for anything more serious anyway.


Well, they've got plenty of time to test the feature. Now time's up


Living in Berlin for almost a decade, bought a house here and love to live here because costs of living is far less than compared to my original city (50k people, even the house market is expensive over there).

No car needed, plenty of services for family and kids. My original city doesn't offer them at all and you need to own a car if you want to go somewhere.


The winners themselves probably


What about the basephone firmware sending tracking data to China?


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

Search: