Better HN
topnewbestaskshowjobs
Log inSign up

hellofunk

9,428 karma · joined Jul 10, 2015 (11y ago) · 3,276 submissions

John Bellick, Mexico City
Submissions

comment 6y ago · link · parent

While true, if your language doesn’t support such a type, then the burden for such a name goes to the parameter, does it not?

comment 6y ago · link · parent

> It wasn't me who said "templates" first.

But you were talking about generics, which implied you were incorrectly conflating that with template meta-programming, since generics are done with templates.

> I don't think of them as a practical way to do compile time computation

Templates are however the most flexible, advance technique for C++ compile-time programming, though the C++ standard is evolving to bring more and more of those features into the language without using templates, i.e. "constexpr if".

My recommendation would be to avoid speculating on what the benefits are of a language or its features if you clearly don't have serious experience using them. It's fine if C++ is not for you.

comment 6y ago · link · parent

I doubt it. Is it common that everyone eventually catches that virus?

comment 6y ago · link · parent

Seems unlikely that virus is so prevalent to infect multiple family members that do not cohabitate but nonetheless show genetic link for BD.

comment 6y ago · link · parent

Indeed Eigen is a popular library for its expression templates that make many math operations much faster.

comment 6y ago · link · parent

Correlation is not causation.

comment 6y ago · link · parent

Hm, I’m not sure where to start with your assessment here. Your comments on sorting don’t really seem relevant, I don’t think you’re referring to the same kind of compile time programming we’ve been discussing. There’s a difference between generic code, and code that runs at compile time, even though both might actually use the C++ feature of templates. C++ templates are way to write code that supports generics, but they are also a way to do a style of programming referred to as “meta-programming“, these are really not the same thing at all.

While you can certainly do without generics in the language, as proven by the success of many many languages, perhaps at the inconvenience of some developers, compile time meta programming is an entirely different area that only few languages really support. The high frequency trading firms and the game studios I have partnered with are typically using C++ specifically for those compile time programming features. They make dramatic performance differences in a wide range of highly specialized algorithms.

comment 6y ago · link · parent

You can cast void pointers in C++ as well, and it is very easy. The difference is that usually you would use a specific kind of cast that makes this clear to the reader.

comment 6y ago · link · parent

You’re talking about really two different issues here. I don’t think anyone would suggest templates can’t get complicated. But they are certainly the doorway into maximum performance over C.

comment 6y ago · link · parent

> these languages all go through most likely the same compiler and should produce a roughly equivalent binary

That's not really true. A single compiler may support many languages but that does not mean code written in those languages ends up as the same binary.

comment 6y ago · link · parent

Strange thing to say, to be honest. Many of the most performance-critical industries are heavy on C++, not C. Games, finance, high-frequency trading, where every microsecond is worth huge money -- these are typically C++ shops. The strictness and ability to move things to compile time are features not available in C.

comment 6y ago · link · parent

> Interestingly, Jacobson’s team also suggests vitamin D as a potentially useful Covid-19 drug. The vitamin is involved in the RAS system and could prove helpful by reducing levels of another compound, known as REN. Again, this could stop potentially deadly bradykinin storms from forming. The researchers note that vitamin D has already been shown to help those with Covid-19. The vitamin is readily available over the counter, and around 20% of the population is deficient. If indeed the vitamin proves effective at reducing the severity of bradykinin storms, it could be an easy, relatively safe way to reduce the severity of the virus.

comment 6y ago · link · parent

A properly formed modern C++ program doesn’t really use memcpy. Most idioms from the C language have a much stricter counterpart that is part of the C++ language.

You’ve made a few comments now about a language that you don’t seem to actually use or know.

comment 6y ago · link · parent

I’m not sure what you’re talking about, to be honest. First, what does this have to do with the type system? Second, C++ typically uses vectors, which know exactly where they end, with the option to use an indexing into them that will throw an exception if you try to access them out of their range. C certainly does not have that.

comment 6y ago · link · parent

This implies that the genetic link is somewhat of a coincidence, the family members just happen to have all caught the same virus? Is that the right interpretation? Because BD does seem to come in waves in families.

comment 6y ago · link · parent

The C++ type system is vastly stricter than C.

comment 6y ago · link · parent

Sigh. I wondered if someone would come in here and do that. The entire reason I did not paste it myself is because this paragraph has a much different effect on the reader after they have read the rest of the article and understand the backstory.

Edit: Thanks for all the upvotes. I'm glad some in the HN crowd appreciate quality over shortcuts and spoilers. (I was starting to get discouraged!)

comment 6y ago · link · parent

Very thrilling read, and the last paragraph sent chills up through my back.

comment 6y ago · link · parent

We've built our SAAS on Keli for the last six years and have been amazed by the productivity. Each year we are able to make a net reduction in lines of code. We are now down to only 2 lines, and we expect next year to be the most impressive yet for what we will need to maintain.

comment 6y ago · link · parent

> They were examples, and not absolutes.

Well, to be fair, you did use the word "always" which makes things sound... absolute.

> always be popular with users that are highly technical, but not necessarily from a comp-sci background

comment 6y ago · link · parent

> Dynamically typed languages, for example, might always be popular with technical, but not comp-sci type users.

Some of the most hardcore "comp-sci" theorists I've ever encountered work only in Scheme, a dynamically typed language.

comment 6y ago · link · parent

Even the word "enum" is quite overloaded; i.e. compare Swift's robust class-like enums with those of C or C++.

comment 6y ago · link · parent

I installed Catalina on one machine, kept the other on Mojave. I can't tell the difference between the two unless I'm looking hard, and both are equally reliable for me.

comment 6y ago · link · parent

It's not just software -- it's services of a wide variety of types. I.e. Apple TV+ is not software. Having your own search engine allows you to integrate with services more tightly and enhance that business.

comment 6y ago · link · parent

They are transitioning as iPhone sales stabilize.

https://www.barrons.com/articles/apple-stock-services-busine...

It’s not all about the hardware anymore.

comment 6y ago · link · parent

This source is not very trustworthy. No one usually uses 24-hour format in a few places not noted here, such as Holland, a decent-sized European country that many people have heard of. But they are not shaded in this chart. So I wonder how many others are also not shaded.

comment 6y ago · link · parent

To suggest that “bug wise“ it is the same between Mac and Linux is a bit of a stretch. I work in a team where the developers are mostly split between Mac and Ubuntu. Guess which ones often have problems joining zoom meetings or attaching their machines to a projector for a presentation? There are a lot of things that you generally don’t have to worry about much if you’re using a Mac. I’m not gonna say that one of these is better than the other, but to suggest they have equivalency wrt common scenarios is a bit strange.

Also, Mac is a certified UNIX environment, it is native.

comment 6y ago · link · parent

Lots of countries use a 12 hour clock, that’s a strange claim to make.

comment 6y ago · link · parent

Regardless, it’s quite pretentious to expect people to put forth creative and expressive energy for something they’re possibly going to end up paying you money for anyway.

comment 6y ago · link · parent

I know that feature was on their internal list of bug fixes, so it sounds like they got through at least that far on the list!
12345
110