OCaml does have +. for floats to make type checking easier, but Standard ML does not. Also, if Swift has operator overloading, why isn't it instantly clear that the RHS is an int, which can be assigned to a double?
This just looks like a performance bug in the type checker, and nothing that is inherent to HM.
In C++ terms, if you have int& operator+(const int&x, const int& y) then (1 + 1) is not ambiguous and can be selected fast. Same for unary minus etc.
The Swift devs should then blog about this example and explain step by step what is going on. If the literal "1" can be both an int and a float, that of course would be insane. Is that what you meant by "polymorphic literals"?
Am I seeing this correctly? Is HM + polymorphic literals + implicit type conversion the cause of Swift’s exploding compile time in such cases?
let result:Double = -(1 + 1) + -(1 + 1) - 1 // 10.829s
let result:Double = -(1 + 1) + -(1 + 1) // 1.724s
let result:Double = (1 + 1) + (1 + 1) - 1 // 1.721s
let result:Double = -(1 + 1) - 1 // 0.763s
let result:Int = -(1 + 1) + -(1 + 1) - 1 // 0.571s
let result:Double = -(1 + 1) + -(1 + 1) + 1
//error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressionsThen there's this fucker for whenever you make a programming error involving types:
>The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
Basically, your code has a type error somewhere in it, and you need to figure out where and how it's wrong.
Xcode is still awful too.
So every edit you need to take a minute to see how it renders?
let x: Double = 2
let y = 5 / x
y is a Double with a value of 2.5. let x: Int = 2
let y = 5 / x
y is an Int with a value of 2. let x: Int = 2
let y: Double = 5 / x
Code doesn't compile.(Edit: I think this is simple enough, just use HN's existing canonical link algorithm and see if the comments for a particular destination exceed the desired rate.)
V compiles itself in <1s, can translate entire DOOM, has a working kernel/OS (Vinix), 10k+ PRs, 600+ contributors etc.
While the bad track record you mention is about junk like git/libc dependencies and system("curl") (doesn't happen).
Can you list actual lies?
Why are you making such false claims? Which features don't work? Please list them.
*edit*
Just like I thought.
You will write walls of text about it being a scam, but you cannot list a single example of such a scam.
Only point to "complete takedown" articles with lies like V not being open source, or nonsense like V depending on git/libc/opengl/make.
You even say that every single feature mentioned on the website is a lie, while it can be verified in a couple of minutes.
Stop. It's boring.
And therein may lie the source of my frustration: HN is full of not only gullible people who fall for these scams, but also the very perpetrators of these scams, using HN as a tool to generate hype.
* "V Language Review (2022)": https://mawfig.github.io/2022/06/18/v-lang-in-2022.html
* "V is for Vaporware": https://xeiaso.net/blog/v-vaporware-2019-06-23/ (and its follow-up, "V is for Vvork in Progress": https://xeiaso.net/blog/v-vvork-in-progress-2020-01-03/)
* This comment on Reddit: https://old.reddit.com/r/ProgrammingLanguages/comments/vq4ul...
There's a whole lot more out there too.
The 2022 article about type checker bugs that have been fixed years ago, and with false claims like the string.len one.
First sentence in the reddit comment:
> V initially made some promises that seemed completely unrealistic (automatically translating any C or C++ program to V)
lol
Completely unrealistic while they literally exist and work.
V not running on every single Linux distro on release is not a lie.
V compiling without deps is not a lie (cc v.c).
etc
The 2019 article is 5 years old. Easy to count.
(Not that having type checker bugs makes a language a scam in the first place.)
@mort96
It's very unfortunate that you make strong claims like "None of the features which sound interesting actually work, and there's no sign that anyone working on the language has any idea how they'll make them work."
and fail to post a single proof of such features.
At the time I was able to reproduce pretty much everything that was said I. This article.
“My haters are just jealous”
Or maybe you and your product are actually bad
I want examples of actual false claims on the website. Because you originally said every single claim on the website is a lie.
for example:
> Another lie, Alex himself wrote to me in Telegram, not the moderator.
the entire thing isn't even about him, but a different person, and that person was contacted by the moderator. Yet this guy thinks it's about him.
Not a very unbiased source.
Bugs and leaks don't make the project a scam. Every project has bugs.
Isn’t this fraud?
This is an article by a guy who calls himself a "V hater" and the stuff from discord sreenshots wasn't even addressed to him.
What are the lies? Please list them here, I'm genuinely interested. Bugs in experimental coroutines, a new WIP feature no even mentioned on the home page yet?
Again, please list just 3 reasons V is a scam.
I’m sorry but this is kind of reading like a paranoid conspiracy level of denial. There is a reason why everyone hates your product and organisation. It’s not some conspiracy against you. It’s that you lied and it sucks
In my personal experience, no. That doesn't mean it's not a weakness of the language, but in practice you very rarely write a real expression with more than one or two type inferences in it. And when you do, you can just add explicit typing.
That's crazy...
Swift programmers: do you face this kind of issues often?